35 lines
845 B
YAML
35 lines
845 B
YAML
version: "3"
|
|
|
|
services:
|
|
payload:
|
|
image: docker.io/library/node:18-alpine
|
|
ports:
|
|
- "${PAYLOAD_PORT}:${PAYLOAD_PORT}"
|
|
volumes:
|
|
- .:/home/node/app
|
|
- node_modules:/home/node/app/node_modules
|
|
working_dir: /home/node/app/
|
|
command: sh -c "npm install && npm run generate:types && npm run dev"
|
|
# command: sh -c "npm install && npm run generate:types && npm run build:payload && npm run serve"
|
|
depends_on:
|
|
- mongo
|
|
environment:
|
|
MONGODB_URI: ${MONGODB_URI}
|
|
PAYLOAD_SECRET: ${PAYLOAD_SECRET}
|
|
PORT: ${PAYLOAD_PORT}
|
|
NODE_ENV: development
|
|
|
|
mongo:
|
|
image: docker.io/library/mongo:latest
|
|
ports:
|
|
- "${MONGODB_PORT}:27017"
|
|
command:
|
|
- --storageEngine=wiredTiger
|
|
volumes:
|
|
- ./mongo:/data/db
|
|
logging:
|
|
driver: none
|
|
|
|
volumes:
|
|
node_modules:
|