forked from django-cms/django-cms-quickstart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
80 lines (71 loc) · 1.87 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
version: "3"
volumes:
django_media:
django_static:
postgres_data:
services:
site_1:
image: docker.io/snakesoft/django-cms-htmx:${BUILD:-latest}
restart: unless-stopped
user: 1000:1000
volumes:
- django_media:/app/media/:rw
- django_static:/app/staticfiles_collected/:rw
depends_on:
- db
- cache
environment:
SITE_ID: ${SITE_ID_1:-1}
DEBUG: ${DEBUG:-False}
DOMAIN: ${DOMAIN_1:-localhost}
DATABASE_URL: ${DATABASE_URL}
command:
- /bin/bash
- -c
- |
./manage.py migrate
./manage.py collectstatic --noinput
gunicorn --bind 0.0.0.0:8000 backend.wsgi:application
profiles: ["all", "deploy", "upgrade", "dev"]
web_1:
image: docker.io/snakesoft/djanginx:1.0
restart: unless-stopped
depends_on:
- site_1
volumes:
- django_media:/app/media/:ro
- django_static:/app/static_root/:ro
environment:
LISTEN_DOMAIN: ${DOMAIN_1:-localhost}
SITE_HOSTNAME: site_1
ports:
- "${PORT_1:-80}:80"
profiles: ["all", "deploy", "upgrade", "dev"]
db:
image: postgres:15.2-alpine
restart: unless-stopped
environment:
POSTGRES_DB: "db"
POSTGRES_USER: "db"
POSTGRES_PASSWORD: "db"
volumes:
- postgres_data:/var/lib/postgresql/data:rw
profiles: ["all", "deploy", "upgrade", "dev"]
cache:
image: redis/redis-stack-server
restart: unless-stopped
profiles: ["all", "deploy", "upgrade", "dev"]
upgrader:
image: docker:20.10.22-git
restart: unless-stopped
working_dir: /app
tty: true
environment:
UPGRADE: ${UPGRADE:-false}
UPGRADE_CI: ${UPGRADE_CI:-false}
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /root/.ssh/:/root/.ssh/:ro
- .:/app:rw
command: /bin/sh -c "/app/upgrader.sh"
profiles: ["all", "deploy"]