Self-contained Express-Postgresql-React project container.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
# docker-compose.yml
|
|
|
|
version: "3"
|
|
|
|
services:
|
|
|
|
server:
|
|
|
|
build: server
|
|
|
|
depends_on:
|
|
|
|
- postgres
|
|
|
|
ports:
|
|
|
|
- "3005:3005"
|
|
|
|
working_dir: /server
|
|
|
|
volumes:
|
|
|
|
- ./server:/server
|
|
|
|
|
|
|
|
postgres:
|
|
|
|
image: postgres:10.4
|
|
|
|
restart: always
|
|
|
|
ports:
|
|
|
|
- "35432:5432"
|
|
|
|
volumes:
|
|
|
|
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
|
|
|
|
- ./postgres-data:/var/lib/postgresql/data
|
|
|
|
environment:
|
|
|
|
POSTGRES_USER: postgres
|
|
|
|
POSTGRES_DB: astronomy
|
|
|
|
|
|
|
|
frontend:
|
|
|
|
build:
|
|
|
|
context: frontend
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
restart: on-failure
|
|
|
|
depends_on:
|
|
|
|
- postgres
|
|
|
|
- server
|
|
|
|
ports:
|
|
|
|
- "13002:3000"
|
|
|
|
environment:
|
|
|
|
- CHOKIDAR_USEPOLLING=true
|
|
|
|
stdin_open: true
|
|
|
|
working_dir: /frontend
|
|
|
|
volumes:
|
|
|
|
- /app/node_modules
|
|
|
|
- ./frontend:/frontend
|
|
|
|
|
|
|
|
|
|
|
|
# prod-frontend:
|
|
|
|
# build:
|
|
|
|
# context: frontend
|
|
|
|
# dockerfile: Dockerfile.prod
|
|
|
|
# ports:
|
|
|
|
# - '3004:80'
|