-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathdocker-compose.yml
102 lines (95 loc) · 2.41 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
version: '3.4'
x-app: &default-app
#image: backend-image:latest
build: ./api
volumes:
- ./api:/api
- ./docker/static:/api/static
- type: bind
source: ./api/.env
target: /api/.env
restart: unless-stopped
depends_on:
- timedb
- cache
environment:
WAIT_HOSTS: timedb:5432, cache:6379
WAIT_TIMEOUT: 60
WAIT_AFTER: 5
x-celery: &celery-app
<<: *default-app
depends_on:
- api
environment:
WAIT_HOSTS: api:8000
WAIT_TIMEOUT: 60
WAIT_AFTER: 5
services:
timedb:
image: timescale/timescaledb:latest-pg16
restart: unless-stopped
volumes:
- folioman-db:/var/lib/postgresql/data
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: foliop4sswd
POSTGRES_DB: folioman
ports:
- "127.0.0.1:15432:5432"
cache:
image: redis:alpine
command: [ "redis-server", "--appendonly", "yes" ]
volumes:
- folioman-cache:/data
ports:
- "127.0.0.1:16379:6379"
ui:
build: ./ui
user: node
volumes:
- ./ui:/home/node/ui
- folioman-ui-node-modules:/home/node/ui/node_modules
working_dir: /home/node/ui
command: sh -c "yarn install && npm run build && npm run start"
api:
build: ./api
command: bash -c "/wait &&
/venv/bin/python /api/manage.py migrate --noinput &&
/venv/bin/python manage.py collectstatic --noinput &&
/venv/bin/gunicorn wsgi --bind 0.0.0.0:8000"
<<: *default-app
depends_on:
- timedb
- cache
web:
image: nginx:alpine
ports:
- "8000:80"
volumes:
- folioman-static:/api/static
- ./docker/nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- api
- ui
beat:
<<: *celery-app
command: bash -c "/wait && rm -f /tmp/beat.pid && /venv/bin/celery -A taskman beat -l INFO --pidfile=/tmp/beat.pid"
worker:
<<: *celery-app
command: bash -c "/wait && /venv/bin/celery -A taskman worker -l INFO"
pgadmin:
image: dpage/pgadmin4
container_name: pgadmin
extra_hosts: [ 'host.docker.internal:host-gateway' ]
environment:
- PGADMIN_DEFAULT_PASSWORD=admin
- PGADMIN_CONFIG_SERVER_MODE=False
- PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED=False
ports:
- "5050:80"
volumes:
folioman-db:
folioman-cache:
folioman-ui-node-modules:
folioman-static: