Repository navigation
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
57 lines (56 loc) · 1.61 KB
/
Copy pathdocker-compose.prod.yml
File metadata and controls
57 lines (56 loc) · 1.61 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
# Production docker file
# - Only rebuilds static site once, when started
# - Build the static site to a staging area before overwriting the old version
# - Disables debugging
# - Enables log rotation
# - Enables email sending
# - Enables SSL certificate generation
# - Enables local database backups with a second on-host copy
services:
frontend:
build:
target: prod
environment:
- "BUNDLE_JS=1"
- "DOMAIN=allaboutberlin.com"
- "SERVICES_DOMAIN=agoodstart.de"
- "CLOUDFLARE_ZONE"
- "CLOUDFLARE_API_KEY"
- "SERVICES_CLOUDFLARE_ZONE"
- "SERVICES_CLOUDFLARE_API_KEY"
volumes: !override
- ".:/var/project:ro"
- "temp_static_site:/var/output"
- "static_site:/var/live-output"
logging: &prod-logging
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
backend:
build:
target: prod
environment:
- "MAILGUN_API_KEY"
- "DB_BACKUPS_COPY_PATH"
- "DOMAIN=allaboutberlin.com"
- "SERVICES_DOMAIN=agoodstart.de"
volumes: !override
- "api_db:/var/db"
- "api_staticfiles:/var/www/api/staticfiles"
- "${DB_BACKUPS_PATH:-./db-backups}:/var/db-backups"
- "${DB_BACKUPS_COPY_PATH:-./db-backups-copy}:/var/db-backups-copy"
restart: unless-stopped
logging: *prod-logging
proxy:
environment:
- "SSL_DOMAIN=allaboutberlin.com"
- "SSL_EMAIL=contact@allaboutberlin.com"
- "SERVICES_SSL_DOMAIN=agoodstart.de"
volumes:
- "static_site:/var/www/html"
restart: unless-stopped
logging: *prod-logging
volumes:
static_site:
temp_static_site: