-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
66 lines (62 loc) · 1.44 KB
/
docker-compose.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
version: '3'
services:
app:
build: . # Build from the Dockerfile in the current directory
container_name: go_app
restart: always
depends_on:
- postgres
- redis
environment:
DATABASE_URL: ${POSTGRES_URL}
REDIS_ADDR: ${REDIS_ADDR}
REDIS_PASSWORD: ${REDIS_PASSWORD}
RPC_URL: ${RPC_URL}
CONTRACT_ADDRESS: ${CONTRACT_ADDRESS}
ports:
- "8080:8080"
networks:
- app-network
redis:
image: redis:7.2.4-alpine
container_name: redis_service
restart: always
command: /bin/sh -c "redis-server --requirepass $$REDIS_PASSWORD"
environment:
REDIS_PASSWORD: ${REDIS_PASSWORD}
ports:
- "6379:6379"
volumes:
- ./opt/redis:/data
networks:
- app-network
postgres:
image: postgres:latest
container_name: postgres_service
restart: always
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- ./opt/postgres:/var/lib/postgresql/data
ports:
- "5432:5432"
networks:
- app-network
pgadmin:
image: dpage/pgadmin4
container_name: pgadmin_service
restart: always
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: admin
ports:
- "5050:80"
depends_on:
- postgres
networks:
- app-network
networks:
app-network:
driver: bridge