forked from lifestores/developer-assessment
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
48 lines (42 loc) · 979 Bytes
/
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
version: "3.9"
services:
db:
image: postgres:14.4-alpine
volumes:
- postgres_data:/var/lib/postgresql/data
env_file:
- ./backend/envs/.env
ports:
- 5432
container_name: lifestore_db
backend:
build:
context: ./backend
dockerfile: Dockerfile
entrypoint: /backend/start.sh
volumes:
- ./backend:/backend
ports:
- 8000
env_file:
- ./config.env
depends_on:
- db
restart: unless-stopped
container_name: lifestore_backend
nginx:
build:
context: .
dockerfile: ./frontend/nginx/Dockerfile
ports:
- 80:80
- 8000:8000
volumes:
- ./frontend/nginx:/etc/nginx/conf.d
- ./backend/config/static/:/usr/share/nginx/html/static/
depends_on:
- backend
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
restart: unless-stopped
volumes:
postgres_data: {}