-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathdocker-compose.yml
46 lines (45 loc) · 1.09 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
version: "3.6"
services:
database:
container_name: stator-postgres-full-stack
image: postgres:latest
build:
context: .
dockerfile: ./apps/database/postgres/Dockerfile
restart: always
command:
- postgres
- -c
- listen_addresses=*
environment:
POSTGRES_DB: stator
POSTGRES_HOST_AUTH_METHOD: "trust" # Not recommended, only for demo purposes
volumes:
# seeding
- ./apps/database/postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
# named volume
- stator-data:/var/lib/postgresql/stator/data
webapp:
container_name: webapp-full-stack
build:
context: .
dockerfile: ./apps/webapp/Dockerfile
ports:
- "${DROPLET_PORT}:80"
api:
container_name: api-full-stack
environment:
- DATABASE_PORT=5432
- DATABASE_HOST=stator-postgres-full-stack
build:
context: .
dockerfile: ./apps/api/Dockerfile
ports:
- "3333:3333"
nginx:
container_name: load-balancer-health-check
image: nginx:latest
ports:
- "80:80"
volumes:
stator-data: