-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
86 lines (84 loc) · 2.1 KB
/
docker-compose.yaml
File metadata and controls
86 lines (84 loc) · 2.1 KB
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
services:
frontend:
build:
dockerfile: Dockerfile.frontend
environment:
- API_SPEC=./openapi-spec/openapi.yaml
- NODE_ENV=production
depends_on:
backend:
condition: service_healthy
develop:
watch:
- path: app/frontend
action: sync+restart
target: /app
- path: app/frontend/node_modules
action: rebuild
target: /app/node_modules
- path: openapi-spec/openapi.yaml
action: rebuild
target: /app/openapi-spec/openapi.yaml
ports:
- "3000:3000"
command: >
bun run dev
backend:
build:
dockerfile: Dockerfile.backend
ports:
- "8080:8080"
develop:
watch:
- path: app/backend
action: sync
target: /app/backend
- path: openapi-spec/openapi.yaml
action: rebuild
depends_on:
db_init:
condition: service_completed_successfully
environment:
- TABLE_NAME=LocalDevTable
- AWS_ACCESS_KEY_ID=local
- AWS_SECRET_ACCESS_KEY=local
- AWS_REGION=us-west-2
- DYNAMODB_ENDPOINT=http://localstack:4566
- IMAGE_BUCKET_NAME=my-bucket
- COGNITO_USER_POOL_ID=us-west-2_XXXXXXXXX
- COGNITO_CLIENT_ID=XXXXXXXXXXXXXXXX
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/ping"]
interval: 5s
timeout: 2s
retries: 5
localstack:
image: localstack/localstack:stable
ports:
- "4566:4566"
environment:
- SERVICES=dynamodb,s3
- PERSISTENCE=1
volumes:
- localstack_data:/var/lib/localstack
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4566/_localstack/health"]
interval: 5s
timeout: 2s
retries: 5
start_period: 20s
db_init:
build:
context: app/seed
depends_on:
localstack:
condition: service_healthy
environment:
- AWS_ACCESS_KEY_ID=local
- AWS_SECRET_ACCESS_KEY=local
- AWS_REGION=us-west-2
- AWS_ENDPOINT=http://localstack:4566
entrypoint: >
bun seed.ts
volumes:
localstack_data: