-
Notifications
You must be signed in to change notification settings - Fork 18
/
docker-compose.yaml
60 lines (60 loc) · 1.47 KB
/
docker-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
version: "3"
services:
app:
build: .
command: bash -c 'python manage.py db upgrade && flask run --host 0.0.0.0'
environment:
FLASK_APP: main.py
FLASK_ENV: development
REDIS_HOST: redis://redis:6379
SQLALCHEMY_DATABASE_URI: postgresql://timeless_user:timeless_pwd@db/timelessdb_dev
ports:
- 5000:5000
volumes:
- .:/usr/app
depends_on:
- db
- redis
db:
image: postgres:10.6
environment:
POSTGRES_DB: timelessdb_dev
POSTGRES_USER: timeless_user
POSTGRES_PASSWORD: timeless_pwd
volumes:
- 'pgdata:/var/lib/postgresql/data'
app_test:
build: .
command: pytest
environment:
FLASK_APP: main.py
FLASK_ENV: testing
REDIS_HOST: redis://redis:6379
SQLALCHEMY_DATABASE_URI: postgresql://timeless_user:timeless_pwd@db_test/timelessdb_test
ports:
- 5000:5000
volumes:
- .:/usr/app
depends_on:
- db_test
db_test:
image: postgres:10.6
environment:
POSTGRES_DB: timelessdb_test
POSTGRES_USER: timeless_user
POSTGRES_PASSWORD: timeless_pwd
redis:
image: 'redis:3.2'
ports:
- '6379:6379'
sync_worker:
build: .
command: bash -c 'celery -A timeless.celery worker'
environment:
FLASK_APP: main.py
FLASK_ENV: development
SQLALCHEMY_DATABASE_URI: postgresql://timeless_user:timeless_pwd@db/timelessdb_dev
volumes:
- .:/usr/app
volumes:
pgdata: null