This repository was archived by the owner on Apr 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
85 lines (78 loc) · 2.01 KB
/
docker-compose.yml
File metadata and controls
85 lines (78 loc) · 2.01 KB
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
version: '3.8'
volumes:
local_postgres_data: {}
services:
django: &django
build:
context: ./key_server
dockerfile: ./docker/Dockerfile
target: prod-django
image: key_server_local_django
restart: always
depends_on:
- postgres
- celerybeat
- celeryworker
- mailhog
environment:
# General
- DJANGO_DEBUG=False
- IPYTHONDIR=/app/.ipython
# Redis
- REDIS_URL=redis://redis:6379/0
# General
- DJANGO_SETTINGS_MODULE=config.settings.base
- DJANGO_SECRET_KEY
- DJANGO_ALLOWED_HOSTS=${DJANGO_ALLOWED_HOSTS:-localhost,127.0.0.1,0.0.0.0}
# Email
- EMAIL_HOST=mailhog
- EMAIL_PORT=1025
# Postgres
- POSTGRES_HOST=${POSTGRES_HOST:-postgres}
- POSTGRES_PORT=${POSTGRES_PORT:-5432}
- POSTGRES_DB=${POSTGRES_DB:-key_server}
- POSTGRES_USER=${POSTGRES_USER:-key_server}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-key_server}
ports:
- "127.0.0.1:${EXTERNAL_PORT_DJANGO:-5000}:5000"
postgres:
image: postgres:12.3
restart: always
volumes:
- local_postgres_data:/var/lib/postgresql/data:Z
environment:
- POSTGRES_HOST=${POSTGRES_HOST:-postgres}
- POSTGRES_PORT=${POSTGRES_PORT:-5432}
- POSTGRES_DB=${POSTGRES_DB:-key_server}
- POSTGRES_USER=${POSTGRES_USER:-key_server}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-key_server}
mailhog:
restart: always
image: mailhog/mailhog:v1.0.0
redis:
restart: always
image: redis:5.0
celeryworker:
<<: *django
image: key_server_local_celeryworker
build:
context: ./key_server
dockerfile: ./docker/Dockerfile
target: prod-worker
depends_on:
- redis
- postgres
- mailhog
ports: []
celerybeat:
<<: *django
image: key_server_local_celerybeat
build:
context: ./key_server
dockerfile: ./docker/Dockerfile
target: prod-beat
depends_on:
- redis
- postgres
- mailhog
ports: []