Updates with Dockerfile and tweaks for db persistence

This commit is contained in:
Matthew Raymer
2023-09-10 08:50:26 -04:00
parent 160c0ceff7
commit bcb636c150
5 changed files with 64 additions and 59 deletions

1
.gitignore vendored
View File

@@ -2,3 +2,4 @@
node_modules
build
web_push
data

View File

@@ -1,6 +1,6 @@
FROM node:18.17.1-alpine3.17
RUN mkdir -p /usr/src/app
RUN mkdir -p /usr/src/app/data
WORKDIR /usr/src/app
COPY package*.json ./
@@ -9,6 +9,7 @@ COPY .eslintrc.json ./
COPY src ./src
RUN npm install
RUN npm run build
EXPOSE 3000

3
build.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
docker build . -t endorser-push-server:1.0 --no-cache

View File

@@ -15,7 +15,7 @@ class DBService {
private constructor() {
this.dataSource = new DataSource({
type: "sqlite",
database: "push_server",
database: "data/push_server",
entities: [VapidKeys, Subscription],
synchronize: true
});