-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
104 lines (93 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
100
101
102
103
104
version: '3.7'
services:
db:
image: postgres:9.6.8
container_name: schema-cms-db
env_file: local.env
volumes:
- db_data:/var/lib/postgresql/data
ports:
- "5432:5432"
localstack:
image: localstack/localstack:0.11.4
container_name: schema-cms-localstack
ports:
- "4566:4566"
environment:
- SERVICES=s3
- DATA_DIR=/tmp/localstack/data
- HOST_TMP_FOLDER=/tmp
- DOCKER_HOST=unix:///var/run/docker.sock
- AWS_DEFAULT_REGION=us-east-1
- AWS_ACCESS_KEY_ID=foo
- AWS_SECRET_ACCESS_KEY=bar
volumes:
- "localstack_data:/tmp/localstack/data"
- "/var/run/docker.sock:/var/run/docker.sock"
privileged: true
backend:
image: schema_cms_backend
container_name: schema-cms-backend
build:
context: backend/app
entrypoint: ["./scripts/entrypoint.sh"]
command: ["./scripts/run_dev.sh"]
env_file: local.env
volumes:
- ./backend/app:/app
- ./backend/functions:/functions
ports:
- "8000:8000"
depends_on:
- db
- localstack
- workerlambda
- mailcatcher
restart: always
stdin_open: true
tty: true
workerlambda:
image: schema_cms_workerlambda
container_name: schema-cms-worker
build:
context: backend/functions/worker
command: handler.main
env_file: local.env
environment:
DOCKER_LAMBDA_STAY_OPEN: 1
DOCKER_LAMBDA_WATCH: 1
AWS_ENDPOINT_URL: http://localstack:4566
IMAGE_SCRAPING_FETCH_TIMEOUT: "15"
AWS_IMAGE_STORAGE_BUCKET_NAME: schemacms-images
AWS_IMAGE_STATIC_URL: http://localstack:4566/schemacms-images
BACKEND_URL: http://backend:8000/api/v1
volumes:
- ./backend/functions/worker:/var/task:ro,delegated
ports:
- "9001:9001"
stdin_open: true
tty: true
restart: on-failure
mailcatcher:
image: schickling/mailcatcher
container_name: schema-cms-mailcatcher
ports:
- 1080:1080
documentation:
restart: always
image: schema_cms_docs
build:
context: backend/app
container_name: schema-cms-docs
command: "mkdocs serve"
volumes:
- ./backend/app:/app
ports:
- "8001:8001"
volumes:
localstack_data:
external:
name: "schema-cms-localstack-data"
db_data:
external:
name: "schema-cms-backend-db-data"