This repository has been archived by the owner on Oct 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
/
docker-compose.yml
99 lines (96 loc) · 2.33 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
version: '3.6'
volumes:
pgdata:
redis-data:
localstack-data:
services:
# infrastructure
db:
image: postgres:10.3-alpine
environment:
POSTGRES_DB: busy-beaver
POSTGRES_USER: bbdev_user
POSTGRES_PASSWORD: bbdev_password
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 3s
retries: 3
start_period: 10s
volumes:
- pgdata:/var/lib/postgresql/data/
ports:
- "9432:5432"
redis:
image: redis:6.0.5-alpine
command: redis-server /usr/local/etc/redis/redis.conf
healthcheck:
test: ["CMD-SHELL", "redis-cli","ping"]
interval: 10s
timeout: 3s
retries: 3
start_period: 10s
volumes:
- ./docker/redis/redis.conf:/usr/local/etc/redis/redis.conf
- redis-data:/data
ports:
- "9379:6379"
# localstack running a fake S3
localstack:
image: localstack/localstack:0.11.5
environment:
- EDGE_PORT=4566
- DEFAULT_REGION=us-east-1
- SERVICES=s3
- DATA_DIR=/tmp/localstack/data
- AWS_ACCESS_KEY_ID=foo
- AWS_SECRET_ACCESS_KEY=foo
- BUCKET_NAME=cdn
ports:
- "4566:4566"
volumes:
- localstack-data:/tmp/localstack/data
- ./scripts/dev:/tmp/dev_scripts
# busy-beaver business logic
app:
build: &app_build
context: .
dockerfile: ./docker/dev/Dockerfile
command: webserver
env_file: .env
depends_on: &app_depends_on
- db
environment: &app_env_vars
ENVIRONMENT: development
PYTHONPATH: .
BASE_URL: http://0.0.0.0:5000
FLASK_APP: /app/busy_beaver/__init__.py
FLASK_ENV: development
DATABASE_URI: postgresql://bbdev_user:bbdev_password@db:5432/busy-beaver
REDIS_URI: redis://redis:6379
OAUTHLIB_INSECURE_TRANSPORT: 1
OAUTHLIB_RELAX_TOKEN_SCOPE: 1
volumes: &app_volumes
- .:/app/
ports:
- 5000:5000
stdin_open: true
tty: true
worker:
build: *app_build
command: worker
env_file: .env
depends_on: *app_depends_on
environment: *app_env_vars
volumes: *app_volumes
stdin_open: true
tty: true
scheduler:
build: *app_build
command: scheduler
env_file: .env
depends_on: *app_depends_on
environment: *app_env_vars
volumes: *app_volumes
stdin_open: true
tty: true