Merge pull request #203 from AustinKelsay/worker-docker-image

Created new image for worker, running work script on startup
This commit is contained in:
Keyan 2022-10-25 16:43:54 -05:00 committed by GitHub
commit 3eaed8c2b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 1 deletions

View File

@ -22,4 +22,22 @@ services:
volumes:
- ./:/app
links:
- db
- db
worker:
container_name: worker
build: ./worker
depends_on:
- db
env_file:
- ./.env.sample
ports:
- "8080:8080"
volumes:
- ./:/app
links:
- db
entrypoint: ["/bin/sh", "-c"]
command:
- |
npm install --loglevel verbose
node worker/index.js

9
worker/Dockerfile Normal file
View File

@ -0,0 +1,9 @@
# syntax=docker/dockerfile:1
FROM node:14.17.0
ENV NODE_ENV=development
WORKDIR /app
EXPOSE 8080