Created new image for worker, running work script on startup

This commit is contained in:
austinkelsay 2022-10-06 15:33:18 -05:00
parent 73033dc015
commit d2f76a0c43
2 changed files with 28 additions and 1 deletions

View File

@ -23,3 +23,21 @@ services:
- ./:/app
links:
- 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