-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathdocker-compose.yml
67 lines (61 loc) · 1.67 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
version: '3.8'
services:
frontend:
labels:
shipyard.route: '/'
build: 'frontend'
environment:
CI: 'true'
DANGEROUSLY_DISABLE_HOST_CHECK: 'true'
env_file:
- frontend/frontend.env
volumes:
- './frontend/src:/app/src'
- './frontend/public:/app/public'
ports:
- '3000:3000'
backend:
labels:
shipyard.init: 'poetry run python src/manage.py migrate'
shipyard.route: '/api'
build: 'backend'
volumes:
- './backend/src:/srv/src/'
- './backend/poetry.lock:/srv/poetry.lock/'
- './backend/pyproject.toml:/srv/pyproject.toml/'
environment:
LOCALSTACK_HOST: 'localstack'
command: ["poetry", "run", "python", "src/manage.py", "runserver", "0:8080"]
ports:
- '8080:8080'
depends_on:
- postgres
postgres:
image: 'postgres:9.6.20-alpine'
restart: always
volumes:
- 'postgres:/var/lib/postgresql/data'
environment:
- POSTGRES_DB=app
- POSTGRES_USER=obscure-user
- POSTGRES_PASSWORD=obscure-password
- PGDATA=/var/lib/postgresql/data/pgdata
ports:
- '5432'
localstack:
container_name: localstack
image: localstack/localstack:latest
ports:
- '127.0.0.1:4566:4566' # LocalStack Gateway
- '127.0.0.1:4510-4559:4510-4559' # external services port range
environment:
- DEBUG=1
- DOCKER_HOST=unix:///var/run/docker.sock
- EXTRA_CORS_ALLOWED_ORIGINS='*'
volumes:
- './init-aws.sh:/etc/localstack/init/ready.d/init-aws.sh'
- 'localstack:/var/lib/localstack'
- '/var/run/docker.sock:/var/run/docker.sock'
volumes:
postgres:
localstack: