forked from DefiFundr-Labs/defifundr_backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
71 lines (67 loc) · 1.5 KB
/
docker-compose.yml
File metadata and controls
71 lines (67 loc) · 1.5 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
services:
api:
build:
context: .
dockerfile: Dockerfile
target: development
container_name: defifundr-api
volumes:
- .:/app
- go-modules:/go/pkg/mod
ports:
- "8080:8080"
- "2345:2345"
environment:
- DB_SOURCE=postgresql://root:secret@postgres:5432/defi?sslmode=disable
depends_on:
postgres:
condition: service_healthy
networks:
- defifundr-network
restart: on-failure
postgres:
image: postgres:15-alpine
container_name: defifundr-postgres
volumes:
- postgres-data:/var/lib/postgresql/data
ports:
- "5433:5432"
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=secret
- POSTGRES_DB=defi
healthcheck:
test: ["CMD-SHELL", "pg_isready -U root -d defi"]
interval: 5s
timeout: 5s
retries: 5
start_period: 10s
networks:
- defifundr-network
pgadmin:
image: dpage/pgadmin4:latest
container_name: defifundr-pgadmin
volumes:
- pgadmin-data:/var/lib/pgadmin
ports:
- "5050:80"
environment:
- PGADMIN_DEFAULT_EMAIL=${PGADMIN_EMAIL:-admin@defifundr.com}
- PGADMIN_DEFAULT_PASSWORD=${PGADMIN_PASSWORD:-admin}
- PGADMIN_CONFIG_SERVER_MODE=False
depends_on:
- postgres
networks:
- defifundr-network
# Networks
networks:
defifundr-network:
driver: bridge
# Volumes
volumes:
postgres-data:
driver: local
pgadmin-data:
driver: local
go-modules:
driver: local