-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
56 lines (50 loc) · 1.22 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
version: "3.7"
services:
backend:
build:
context: ./rate_my_racket_backend
dockerfile: Dockerfile
volumes:
- django_static_volume:/usr/src/app/static
- django_media_volume:/usr/src/app/media
hostname: backend
expose:
- 8000
command: ./entrypoint.sh
links:
- database
env_file:
- ./rate_my_racket_backend/rate_my_racket_backend/settings/.env
database:
image: postgres:13-alpine
volumes:
- postgres_data:/var/lib/postgresql/data/
restart: 'always'
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- 5432:5432
rate_my_racket_frontend:
build:
context: ./rate-my-racket-frontend
dockerfile: Dockerfile
container_name: rate-my-racket-frontend-nextjs
ports:
- 3000:3000
env_file: ./rate-my-racket-frontend/.env.local
nginx:
restart: always
build: ./rate_my_racket_backend/nginx
volumes:
- django_static_volume:/usr/src/app/static
- django_media_volume:/usr/src/app/media
ports:
- 80:80
links:
- backend
volumes:
postgres_data:
django_static_volume:
django_media_volume: