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

38 lines
908 B
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
command: sh -c "yarn install && npx nodemon server.js"
postgres:
image: "postgres:13.1-alpine"
environment:
- POSTGRES_USER=pastebin
- POSTGRES_PASSWORD=buginoo
#volumes:
# - ./postgres/pgdata:/var/lib/postgresql/data
expose:
- "5432"