diff --git a/.dockerignore b/.dockerignore index 3c3629e..41cb20a 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1 +1,27 @@ +# Editor stuff +.vscode + +# Test stuff +test +coverage +.nyc_output +src/lib/utils/saved_requests/files + +# Database stuff +db +*.log +*.csv + +# Personal stuff +notes.txt +config.js + +# Cached stuff +db node_modules + +# Stuff Docker doesn't need +.git +art +*.log +*.csv diff --git a/Dockerfile b/Dockerfile index 4505da9..a13dad4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,11 @@ -FROM node:12.18.1-alpine as build +FROM node:14.5.0-alpine as build RUN apk --no-cache add git python3 make g++ WORKDIR /app COPY . . +COPY ./.config.js.default ./config.js RUN npm install --no-optional -FROM node:12.18.1-alpine as app +FROM node:14.5.0-alpine as app WORKDIR /app COPY --from=build /app /app EXPOSE 10407 diff --git a/docker-compose.yml b/docker-compose.yml index 28ec707..f1fa818 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,9 +1,12 @@ -bibliogram: - build: . - volumes: - - ./config.js:/app/config.js:ro - - ./db:/app/db - ports: - - "10407:10407" - restart: - unless-stopped +version: '3' +volumes: + db: +services: + bibliogram: + build: . + image: cloudrac3r/bibliogram + volumes: + - db:/app/db + ports: + - 10407:10407 + restart: unless-stopped