-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
75 lines (72 loc) · 1.73 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
version: '3.8'
services:
dev:
build:
context: .
target: development
args:
UID: ${UID:-2000}
GID: ${GID:-2000}
container_name: rowo_oekostrom_db_dev
volumes:
- type: bind
source: ./uploads
target: /home/app/uploads
- type: bind
source: ./logs
target: /home/app/logs
- type: bind
source: ./oekostrom_db
target: /home/app/oekostrom_db
env_file:
- .env
environment:
# ensure we can connect to
DJANGO_INTERFACE: "0.0.0.0:8000"
DJANGO_ALLOWED_HOSTS: "localhost 127.0.0.1 dev"
DJANGO_CSRF_TRUSTED_ORIGINS: "http://127.0.0.1 http://127.0.0.1:8000"
DJANGO_LOG_FILE: "/home/app/logs/django.log"
DJANGO_ANBIETER_LOG_FILE: "/home/app/logs/anbieter.log"
DJANGO_LOG_MAIL: "1"
MEDIA_ROOT: "/home/app/uploads"
MEDIA_URL: "/f"
depends_on:
- db
ports:
- "8000:8000"
nginx_dev:
build:
context: .
target: nginx
args:
UID: ${UID:-2000}
GID: ${GID:-2000}
container_name: rowo_oekostrom_db_nginx_dev
environment:
NGINX_HOST: "foobar.com"
NGINX_PORT: "80"
NGINX_TARGET: "dev:8000"
MEDIA_ROOT: "/home/app/uploads"
MEDIA_URL: "/f"
volumes:
- type: bind
source: ./uploads
target: /home/app/uploads
ports:
- "80:80"
depends_on:
- dev
db:
image: postgres:13
restart: always
# set shared memory limit when using docker-compose
shm_size: 128mb
container_name: rowo_oekostrom_db_postgres
env_file:
- .env
volumes:
- type: "bind"
source: "./initdb"
target: "/docker-entrypoint-initdb.d/"
ports:
- "5432:5432"