-
Notifications
You must be signed in to change notification settings - Fork 23
/
compose.yaml
81 lines (71 loc) · 1.66 KB
/
compose.yaml
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
x-byceps-base: &byceps-base
build: .
volumes:
- ./data:/home/byceps/data
depends_on:
- db
- redis
x-byceps-base-env: &byceps-base-env
REDIS_URL: "redis://redis/0"
SECRET_KEY: /run/secrets/secret_key
SQLALCHEMY_DATABASE_URI: "postgresql+psycopg://byceps:byceps@db/byceps"
services:
db:
image: "postgres:15"
restart: unless-stopped
volumes:
- db-data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: byceps
POSTGRES_USER: byceps
networks:
- byceps
redis:
image: "redis:7"
networks:
- byceps
byceps-apps:
<<: *byceps-base
volumes:
- ./config/apps.toml:/home/byceps/config/apps.toml:ro
environment:
<<: *byceps-base-env
BYCEPS_APPS_CONFIG: /home/byceps/config/apps.toml
networks:
- byceps
- proxy
byceps-worker:
<<: *byceps-base
environment:
<<: *byceps-base-env
APP_MODE: worker
command: ./worker.py
networks:
- byceps
web:
image: nginx
volumes:
- ./docker/nginx/includes:/etc/nginx/includes:ro
- ./docker/nginx/templates:/etc/nginx/templates:ro
- .:/var/www/byceps:ro
depends_on:
- byceps-apps
environment:
SERVER_NAME_ADMIN: admin.byceps.example
SERVER_NAME_API: api.byceps.example
SERVER_NAME_SITE: cozylan.example
UWSGI_ADDRESS: byceps-apps:5000
ports:
- "8080:80"
networks:
- proxy
secrets:
secret_key:
# To generate a secret key file, run:
# `docker compose run --rm byceps-apps byceps generate-secret-key > ./secret_key.txt`
file: ./secret_key.txt
volumes:
db-data:
networks:
byceps:
proxy: