-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
106 lines (99 loc) · 2.46 KB
/
docker-compose.yml
File metadata and controls
106 lines (99 loc) · 2.46 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
services:
frontend:
build:
context: ./frontend
dockerfile: Dockerfile.dev
ports:
- "3000:3000"
environment:
- VITE_API_URL=${VITE_API_URL:-http://localhost:8080}
volumes:
- ./frontend:/app
- /app/node_modules
depends_on:
- api
networks:
- hackathon-network
api:
build:
context: .
dockerfile: Dockerfile.dev
ports:
- "8080:8080"
environment:
- ENV=development
- AWS_REGION=${AWS_REGION:-ap-northeast-1}
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID:-test}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY:-test}
- S3_BUCKET_NAME=${S3_BUCKET_NAME:-hackathon-uploads}
- S3_REGION=${S3_REGION:-ap-northeast-1}
- AWS_ENDPOINT_URL=${AWS_ENDPOINT_URL:-http://localstack:4566}
- AWS_PUBLIC_ENDPOINT_URL=${AWS_PUBLIC_ENDPOINT_URL:-http://localhost:4566}
- AWS_S3_FORCE_PATH_STYLE=${AWS_S3_FORCE_PATH_STYLE:-true}
- DB_HOST=postgres
- DB_PORT=5432
- DB_NAME=hackathon_db
- DB_USER=postgres
- DB_PASSWORD=password
- REDIS_HOST=redis
- REDIS_PORT=6379
volumes:
- .:/app
- /app/bin
depends_on:
- postgres
- redis
- localstack
networks:
- hackathon-network
postgres:
image: postgres:15-alpine
environment:
POSTGRES_DB: hackathon_db
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./scripts/init-db.sql:/docker-entrypoint-initdb.d/init-db.sql
networks:
- hackathon-network
redis:
image: redis:7-alpine
ports:
- "6379:6379"
volumes:
- redis_data:/data
networks:
- hackathon-network
localstack:
image: localstack/localstack:3
environment:
- SERVICES=s3
- DEBUG=1
- AWS_DEFAULT_REGION=${AWS_REGION:-ap-northeast-1}
- AWS_REGION=${AWS_REGION:-us-east-1}
- S3_BUCKET_NAME=${S3_BUCKET_NAME:-hackathon-uploads}
- DOCKER_HOST=unix:///var/run/docker.sock
ports:
- "4566:4566"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- ./tools/localstack:/etc/localstack/init/ready.d
networks:
- hackathon-network
adminer:
image: adminer
ports:
- "8081:8080"
depends_on:
- postgres
networks:
- hackathon-network
volumes:
postgres_data:
redis_data:
networks:
hackathon-network:
driver: bridge