Created new image for worker, running work script on startup
This commit is contained in:
parent
73033dc015
commit
d2f76a0c43
|
@ -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
|
|
@ -0,0 +1,9 @@
|
|||
# syntax=docker/dockerfile:1
|
||||
|
||||
FROM node:14.17.0
|
||||
|
||||
ENV NODE_ENV=development
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
EXPOSE 8080
|
Loading…
Reference in New Issue