41 lines
835 B
YAML
41 lines
835 B
YAML
version: "3.3"
|
|
|
|
services:
|
|
pg:
|
|
image: postgres:latest
|
|
environment:
|
|
POSTGRES_USER: 'mcrates'
|
|
POSTGRES_DB: 'mcrates'
|
|
POSTGRES_PASSWORD: 'digdeep'
|
|
ports:
|
|
- '45432:5432'
|
|
volumes:
|
|
- "./db:/var/lib/postgresql/data"
|
|
|
|
api:
|
|
image: node:16
|
|
working_dir: /opt/mcrates/api
|
|
depends_on:
|
|
- 'pg'
|
|
entrypoint: npm start
|
|
environment:
|
|
DATABASE_URL: 'postgresql://mcrates:digdeep@pg:5432/mcrates?schema=public'
|
|
volumes:
|
|
- "./api:/opt/mcrates/api"
|
|
|
|
client:
|
|
image: node:16
|
|
working_dir: /opt/mcrates/client
|
|
entrypoint: npm start
|
|
volumes:
|
|
- "./client:/opt/mcrates/client"
|
|
|
|
nginx:
|
|
image: nginx:latest
|
|
depends_on:
|
|
- 'api'
|
|
volumes:
|
|
- './nginx/localhost.nginx.conf:/etc/nginx/conf.d/default.conf'
|
|
ports:
|
|
- '80:80'
|