You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pastebin/docker-compose.yml

41 lines
1.0 KiB
YAML

version: '3'
services:
nginx:
image: 'nginx:1.19.6-alpine'
working_dir: "/usr/share/nginx/html"
volumes:
# individual files require full path:
- ${PWD}/nginx/default.conf:/etc/nginx/conf.d/default.conf
- ${PWD}/nginx/public_html:/usr/share/nginx/html
ports:
- "3001:80"
depends_on:
- node
node:
build:
context: ./node/
dockerfile: Dockerfile
#restart: always
user: "node"
environment:
- NODE_ENV=development
volumes:
- ./node/:/home/node/app
expose:
- "80"
depends_on:
- postgres
working_dir: /home/node/app
# for production (no file watching):
# command: sh -c "yarn install && yarn pm2-runtime server.js"
# for development (file watching/reloading):
command: sh -c "yarn install && yarn pm2-dev server.js"
postgres:
image: "postgres:13.1-alpine"
environment:
- POSTGRES_USER=pastebin
- POSTGRES_PASSWORD=buginoo
#volumes:
# - ./postgres/pgdata:/var/lib/postgresql/data
expose:
- "5432"