Browse Source

Updates with Dockerfile and tweaks for db persistence

unsubscribe-mute
Matthew Raymer 1 year ago
parent
commit
bcb636c150
  1. 1
      .gitignore
  2. 3
      Dockerfile
  3. 3
      build.sh
  4. 2
      src/db.ts

1
.gitignore

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

3
Dockerfile

@ -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

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

2
src/db.ts

@ -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
});

Loading…
Cancel
Save