-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
89 lines (79 loc) · 1.88 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
version: '3.7'
x-common: &base
image: cmsdemo
depends_on:
- db
environment:
AWS_ACCESS_KEY_ID:
AWS_SECRET_ACCESS_KEY:
AWS_SHARED_CREDENTIALS_FILE: '/.aws-credentials'
DATABASE_ENGINE: 'django.db.backends.postgresql'
DATABASE_HOST: 'db'
DATABASE_USER: 'docker'
DATABASE_PASSWORD: 'docker'
DATABASE_NAME: 'docker'
DATABASE_PORT: '5432'
DJANGO_SETTINGS_MODULE: 'project.settings'
DEBUG: 'yes'
ALLOWED_HOSTS: '*'
DEFAULT_HTTP_PROTOCOL: 'http'
EMAIL_DEBUG: 'False'
EMAIL_INTERNAL: 'True'
CSRF_COOKIE_SECURE: 'False'
SESSION_COOKIE_SECURE: 'False'
SECURE_BROWSER_XSS_FILTER: 'False'
SECURE_CONTENT_TYPE_NOSNIFF: 'False'
SECURE_HSTS_SECONDS: 31536000
SECURE_HSTS_INCLUDE_SUBDOMAINS: 'False'
volumes:
- ~/.aws/credentials:/.aws-credentials
services:
cmsdemo:
image: cmsdemo
build:
context: .
dockerfile: Dockerfile
target: app
nginx:
image: nginx:1.18.0
depends_on:
- python
environment:
NGINX_HOST: python
MGINX_PORT: 9000
ports:
- "${HTTP_PORT_2:-8080}:80"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:80"]
interval: 15s
timeout: 30s
retries: 3
start_period: 30s
volumes_from:
- python:ro
python:
<<: *base
command: ["/usr/local/bin/uwsgi", "--ini", "config/uwsgi/uwsgi.ini"]
depends_on:
- db
ports:
- "${HTTP_PORT:-8000}:8000"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000"]
interval: 15s
timeout: 30s
retries: 3
start_period: 30s
db:
image: kartoza/postgis:12.1
environment:
POSTGRES_USER: docker
POSTGRES_PASSWORD: docker
POSTGRES_DB: docker
ports:
- "${DB_PORT:-5432}:5432"
volumes:
- db_data:/var/lib/postgresql/data/
volumes:
db_data:
driver: local