-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (47 loc) · 1.09 KB
/
Copy pathdocker-compose.yml
File metadata and controls
52 lines (47 loc) · 1.09 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
version: "3.9"
services:
api:
build:
context: .
dockerfile: Dockerfile
container_name: cloud-cost-tracker
volumes:
- .:/app
- go-cache:/go/pkg/mod
- tmp-data:/app/tmp
ports:
- "8080:8080"
environment:
- PORT=8080
- DATABASE_URL=postgres://user:pass@postgres:5432/cloud_cost_tracker?sslmode=disable
- REDIS_ADDR=redis:6379
depends_on:
- postgres
- redis
postgres:
image: postgres:15
container_name: cloud-cost-tracker-db
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: pass
POSTGRES_DB: cloud_cost_tracker
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
redis:
image: redis:7
container_name: cloud-cost-tracker-redis
ports:
- "6379:6379"
migrate:
image: migrate/migrate
command: ["-path", "/migrations", "-database", "postgres://user:pass@postgres:5432/cloud_cost_tracker?sslmode=disable", "up"]
volumes:
- ./migrations:/migrations
depends_on:
- postgres
volumes:
pgdata:
go-cache:
tmp-data: