-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-prod.yml
68 lines (64 loc) · 1.64 KB
/
docker-compose-prod.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
services:
web:
build:
context: .
target: fws_web
restart: "no"
environment:
FWSWEB_ENVIRONMENT: production
FWSWEB_DB_HOST: db
ports:
- "8088:80"
depends_on:
- db
db:
image: postgres:15.3-alpine
restart: always
environment:
POSTGRES_USER: fws
POSTGRES_PASSWORD: fws_pass
POSTGRES_DB: fws
PGDATA: /var/lib/postgresql/data # explicitly set it to the default location, because why not?
volumes:
- type: bind
source: ./production_data/db
target: /var/lib/postgresql/data
bind:
create_host_path: true
read_only: false
command: ["postgres",
"-c", "client_encoding=UTF8",
"-c", "default_transaction_isolation=read committed",
"-c", "timezone=UTC"]
rabbitmq:
image: rabbitmq:3.12-alpine
restart: always
environment:
RABBITMQ_DEFAULT_USER: fws
RABBITMQ_DEFAULT_PASS: fws_pass
RABBITMQ_DEFAULT_VHOST: fws_vhost
celery_worker:
build:
context: .
target: fws_cel
restart: "no"
command: ["worker", "--loglevel=DEBUG", "--logfile=/tmp/celery.log"]
environment:
FWSWEB_ENVIRONMENT: production
FWSWEB_DB_HOST: db
depends_on:
- rabbitmq
- db
celery_beat:
build:
context: .
target: fws_cel
restart: "no"
command: ["beat", "--loglevel=DEBUG", "--logfile=/tmp/celery.beat.log",
"--scheduler=django_celery_beat.schedulers:DatabaseScheduler"]
environment:
FWSWEB_ENVIRONMENT: production
FWSWEB_DB_HOST: db
depends_on:
- celery_worker
- db