-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
121 lines (114 loc) · 3.16 KB
/
docker-compose.yml
File metadata and controls
121 lines (114 loc) · 3.16 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
volumes:
static:
media:
services:
# External reverse proxy that mimics production infrastructure
external-proxy:
image: nginx:alpine
ports:
# The HTTP port (now this is the main entry point)
- "80:80"
volumes:
- ./ci/nginx-reverse-proxy.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- reverse-proxy
logging:
options:
max-size: "10m"
max-file: "3"
reverse-proxy:
# Traefik reverse proxy (pinned to a version compatible with Docker 29+)
image: traefik:v3.6.2
# Enables the web UI and tells Traefik to listen to docker
command:
- "--providers.docker"
- "--api=true"
- "--api.insecure=true"
- "--api.dashboard=true"
- "--entrypoints.web"
- "--entrypoints.web.address=:8000"
- "--entrypoints.traefik"
- "--entrypoints.traefik.address=:8080"
ports:
# Traefik now runs on 8001 (behind external-proxy)
- "8001:8000"
# The Web UI (enabled by --api.insecure=true)
- "8080:8080"
privileged: true
volumes:
# So that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock
logging:
options:
max-size: "10m"
max-file: "3"
labels:
# API dashboard should only be accessible on dedicated port
traefik.http.routers.api.rule: "Host(`traefik.localhost`)"
traefik.http.routers.api.service: api@internal
web:
container_name: seeder-web
build:
context: .
volumes:
- .:/code
- "static:/code/Seeder/static_root"
- "media:/code/Seeder/media"
command: bash run.sh
working_dir: /code/Seeder
labels:
- "traefik.http.routers.seeder.rule=Host(`localhost`) || Host(`127.0.0.1`)"
logging:
options:
max-size: "10m"
max-file: "3"
environment:
DEBUG: "True"
THUMBNAIL_DEBUG: "True"
DJANGO_SETTINGS_MODULE: settings.env
ALLOWED_HOSTS: 127.0.0.1 localhost
# Keep local development database settings
DB_HOST: postgres
DB_NAME: postgres
DB_USER: postgres
DB_PASS: postgres
depends_on:
- postgres
- memcached
static:
image: nginx:alpine
volumes:
- static:/seeder/static:ro
- media:/seeder/media:ro
- ./ci/templates/nginx.conf:/etc/nginx/conf.d/default.conf:ro
logging:
options:
max-size: "10m"
max-file: "3"
labels:
traefik.http.routers.static.rule: "Host(`localhost`) && (PathPrefix(`/static`) || PathPrefix(`/media`)) || Host(`127.0.0.1`) && (PathPrefix(`/static`) || PathPrefix(`/media`))"
depends_on:
- web
vyvoj:
image: webarchiv/vyvoj:naki
logging:
options:
max-size: "10m"
max-file: "3"
labels:
traefik.http.routers.vyvoj.rule: "Host(`localhost`) && PathPrefix(`/vyvoj`) || Host(`127.0.0.1`) && PathPrefix(`/vyvoj`)"
postgres:
image: postgres:9.6
logging:
options:
max-size: "10m"
max-file: "3"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
memcached:
image: memcached:latest
logging:
options:
max-size: "10m"
max-file: "3"