-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
77 lines (69 loc) · 2.13 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
version: "3"
services:
flasker:
container_name: flasker-api
build: .
volumes:
- ./logs:/flasker/logs # Store logs on local drive
networks:
- backend
- webproxy
# Use expose when using lets-encrypt/nginx webproxy container
expose:
- "5003"
restart: always
environment:
- "FLASK_ENV=production"
- "APP_SETTINGS=config.ProductionConfig"
- "VIRTUAL_HOST=api.flasker.com,www.api.flasker.com"
- "LETSENCRYPT_HOST=api.clasker.com,www.api.flasker.com"
#- "OAUTHLIB_RELAX_TOKEN_SCOPE=1" # Allow Google API to work
#- "REDIS_URL=redis://redis:6379/0" # Connect to redis
depends_on:
- postgres
#- redis
#flasker-worker:
# container_name: flasker-api-worker
# build: .
# command: rq worker --url redis://redis:6379 flasker-tasks
# volumes:
# - ./logs:/flasker/logs
# networks:
# - backend
# restart: always
# environment:
# - "FLASK_ENV=production"
# - "APP_SETTINGS=config.ProductionConfig"
# #- "OAUTHLIB_RELAX_TOKEN_SCOPE=1" # Allow Google API to work
# - "REDIS_URL=redis://redis:6379/0" # Connect to redis
# depends_on:
# - postgres
# - redis
#redis:
# container_name: flasker-redis
# image: redis
# restart: always
# networks:
# - backend
postgres:
container_name: flasker-postgres
image: postgres:11-alpine
volumes:
- flasker_postgres_data:/var/lib/postgresql # Store data here
networks:
- backend
restart: always
expose:
- "5432"
environment:
- "POSTGRES_USER=flasker"
- "POSTGRES_PASSWORD=correct-horse-battery-staple"
- "POSTGRES_DATABASE=flasker"
volumes:
flasker_postgres_data:
networks:
backend:
webproxy:
external:
name: webproxy