-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
103 lines (95 loc) · 2.33 KB
/
docker-compose.dev.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
# Local development setup with hot reload on all three services
version: "3.9"
services:
backend:
build:
context: .
dockerfile: ./clovers-back/dev.Dockerfile
volumes:
- ./:/app
command: sh -c "cargo watch -x 'run --release --bin clovers-back'"
ports:
- 8080:8080
env_file: ./clovers-back/.env
depends_on:
- postgres
- redis
batch:
build:
context: .
dockerfile: ./clovers-batch/dev.Dockerfile
volumes:
- ./:/app
command: sh -c "cargo watch -x 'run --release --bin clovers-batch'"
env_file: ./clovers-batch/.env
depends_on:
- postgres
- redis
- backend
preview:
build:
context: .
dockerfile: ./clovers-preview/dev.Dockerfile
volumes:
- ./:/app
command: sh -c "cargo watch -x 'run --release --bin clovers-preview'"
env_file: ./clovers-preview/.env
depends_on:
- redis
- backend
frontend:
build:
context: ./clovers-front
dockerfile: dev.Dockerfile
volumes:
- ./clovers-front/:/app
env_file: ./clovers-front/.env
ports:
- 3000:3000
postgres:
restart: always
image: "postgres:14.3"
ports:
- 5432:5432
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
- pg_data:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=local_development_passphrase
redis:
restart: always
image: "redis:7.0-alpine"
command: redis-server
expose:
- 6379
volumes:
- redis_data:/data
localstack:
container_name: "${LOCALSTACK_DOCKER_NAME-localstack_main}"
image: localstack/localstack:2.3
ports:
- "4566:4566" # LocalStack Gateway
environment:
- SERVICES=s3:4566
- DEBUG=${DEBUG-}
volumes:
- "${LOCALSTACK_VOLUME_DIR:-./volume}:/var/lib/localstack"
createbucket:
image: amazon/aws-cli:2.13.29
depends_on:
- localstack
volumes:
- bucket:/aws
environment:
- AWS_ACCESS_KEY_ID=test
- AWS_SECRET_ACCESS_KEY=test
- AWS_DEFAULT_REGION=eu-north-1
entrypoint: /bin/sh -c
command: >
"
aws --endpoint-url=http://localstack:4566 s3api create-bucket --bucket clovers --region eu-north-1 --create-bucket-configuration LocationConstraint=eu-north-1
"
volumes:
pg_data:
redis_data:
bucket: