Updates with Dockerfile and tweaks for db persistence
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,3 +2,4 @@
|
|||||||
node_modules
|
node_modules
|
||||||
build
|
build
|
||||||
web_push
|
web_push
|
||||||
|
data
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
FROM node:18.17.1-alpine3.17
|
FROM node:18.17.1-alpine3.17
|
||||||
|
|
||||||
RUN mkdir -p /usr/src/app
|
RUN mkdir -p /usr/src/app/data
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
@@ -9,6 +9,7 @@ COPY .eslintrc.json ./
|
|||||||
COPY src ./src
|
COPY src ./src
|
||||||
|
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|||||||
3
build.sh
Executable file
3
build.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
docker build . -t endorser-push-server:1.0 --no-cache
|
||||||
@@ -15,7 +15,7 @@ class DBService {
|
|||||||
private constructor() {
|
private constructor() {
|
||||||
this.dataSource = new DataSource({
|
this.dataSource = new DataSource({
|
||||||
type: "sqlite",
|
type: "sqlite",
|
||||||
database: "push_server",
|
database: "data/push_server",
|
||||||
entities: [VapidKeys, Subscription],
|
entities: [VapidKeys, Subscription],
|
||||||
synchronize: true
|
synchronize: true
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user