forked from byceps/byceps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
68 lines (58 loc) · 1.32 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
x-byceps-base: &byceps-base
build: .
volumes:
- byceps-data:/home/byceps/data:rw
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+psycopg2://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
redis:
image: "redis:7"
byceps-admin:
<<: *byceps-base
environment:
<<: *byceps-base-env
APP_MODE: admin
byceps-site:
<<: *byceps-base
environment:
<<: *byceps-base-env
APP_MODE: site
SITE_ID: cozylan
byceps-worker:
<<: *byceps-base
environment:
<<: *byceps-base-env
APP_MODE: worker
command: ./worker.py
web:
image: nginx
volumes:
- ./docker/nginx-templates:/etc/nginx/templates
- .:/var/www/byceps
depends_on:
- byceps-admin
- byceps-site
ports:
- "8081:81"
- "8082:82"
secrets:
secret_key:
# TODO: Generate secret key file with:
# `docker-compose run --rm byceps-admin byceps generate-secret-key > ./secret_key.txt`
file: ./secret_key.txt
volumes:
byceps-data:
db-data: