-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-prod.yaml
70 lines (67 loc) · 1.69 KB
/
docker-compose-prod.yaml
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
version: '3.8'
services:
prod:
build:
context: .
target: production
args:
UID: ${UID:-2000}
GID: ${GID:-2000}
container_name: rowo_oekostrom_db_prod
env_file:
- .env
environment:
DJANGO_ALLOWED_HOSTS: "localhost 127.0.0.1 prod rowo.kound.de stromdb.robinwood.de"
DJANGO_CSRF_TRUSTED_ORIGINS: "http://127.0.0.1 http://127.0.0.1:8000 https://rowo.kound.de https://stromdb.robinwood.de"
MEDIA_ROOT: "/home/app/uploads"
MEDIA_URL: "/f"
DJANGO_LOG_FILE: "/home/app/logs/django.log"
DJANGO_ANBIETER_LOG_FILE: "/home/app/logs/anbieter.log"
DJANGO_LOG_MAIL: "1"
volumes:
- type: bind
source: ./uploads
target: /home/app/uploads
- type: bind
source: ./logs
target: /home/app/logs
depends_on:
- db
ports:
- "127.0.0.1:8000:8000"
nginx_prod:
build:
context: .
target: nginx
args:
UID: ${UID:-2000}
GID: ${GID:-2000}
container_name: rowo_oekostrom_db_nginx_prod
environment:
NGINX_HOST: "stromdb.robinwood.de"
NGINX_PORT: "8001"
NGINX_TARGET: "prod:8000"
MEDIA_ROOT: "/home/app/uploads"
MEDIA_URL: "/f"
volumes:
- type: bind
source: ./uploads
target: /home/app/uploads
ports:
- "127.0.0.1:8001:8001"
depends_on:
- prod
db:
image: postgres:13
restart: always
# set shared memory limit when using docker-compose
shm_size: 128mb
container_name: rowo_oekostrom_db_postgres_prod
env_file:
- .env
volumes:
- type: bind
source: ./.db
target: /var/lib/postgresql/data/
ports:
- "5432:5432"