-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
68 lines (62 loc) · 1.37 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
version: '3'
networks:
handoff_network:
external: true
services:
api:
build:
context: ./backend
dockerfile: Dockerfile.api
command: bash -c "python manage.py migrate && gunicorn myapi.wsgi:application -b 0.0.0.0:8000"
volumes:
- ./backend:/backend
ports:
- "8000:8000"
depends_on:
- postgres
networks:
- handoff_network
environment:
- DJANGO_SECRET_KEY=${DJANGO_SECRET_KEY:-default_value}
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
frontend:
build:
context: ./frontend
dockerfile: Dockerfile.frontend
command: npm start
volumes:
- ./frontend:/frontend
ports:
- "3000:3000"
depends_on:
- api
networks:
- handoff_network
postgres:
image: postgres:latest
environment:
POSTGRES_USER: matt
POSTGRES_PASSWORD: mpl
POSTGRES_DB: handofftest
POSTGRES_INITDB_ARGS: "--encoding=UTF-8 --lc-collate=C --lc-ctype=C --data-checksums"
ports:
- "5433:5432"
networks:
- handoff_network
nginx:
image: nginx:latest
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro # Mount your Nginx configuration file
ports:
- "80:80"
depends_on:
- api
networks:
- handoff_network
volumes:
postgres_data:
external: true