-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
47 lines (44 loc) · 1022 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
version: '3.8'
services:
app:
build: .
container_name: app
environment:
SECRET_KEY: test
DJANGO_SETTINGS_MODULE: "dragonroost.production"
depends_on:
- db
ports:
- 8000:8000
volumes:
- ./media:/app/media
# this service will use same image, and once the migration is done it will be stopped
# app_migrations:
# build: .
# command: ./manage.py migrate
db:
image: postgres:latest
container_name: db
restart: always
volumes:
- ./prod_db_data:/var/lib/postgresql/data
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: apasswordforadb
POSTGRES_DB: dragondb
redis:
image: redis:latest
container_name: redis
ports:
- 6379:6379
volumes:
- redis_data:/data
mailhog:
image: mailhog/mailhog
container_name: mailhog
ports:
- 1025:1025 # SMTP server
- 8025:8025 # Web UI
volumes:
prod_db_data:
redis_data: