-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
116 lines (108 loc) · 2.28 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
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
107
108
109
110
111
112
113
114
115
116
version: '3.5'
services:
app:
container_name: gofiber_app
build:
context: .
dockerfile: Dockerfile
command: sh -c "cd src && go mod download && air"
environment:
- PORT=8000
ports:
- '8000:8000'
working_dir: /opt/gofiber-app
volumes:
- .:/opt/gofiber-app/:cached
depends_on:
- postgres
- mongo
- redis
networks:
- 'gofiber-net'
postgres:
image: postgres:12
container_name: gofiber_postgres
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
- DATABASE_HOST=${DB_HOST}
ports:
- '5432:5432'
volumes:
- ./postgres_data:/var/lib/postgresql/data
logging:
driver: none
networks:
- 'gofiber-net'
pgadmin:
image: dpage/pgadmin4
container_name: gofiber_pgadmin
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD}
depends_on:
- postgres
ports:
- '5050:80'
restart: unless-stopped
logging:
driver: none
networks:
- 'gofiber-net'
# MongoDB
mongo:
image: 'mongo:4.2-bionic'
container_name: gofiber_mongo
ports:
- '27017:27017'
volumes:
- ./mongodata:/data/db
restart: always
logging:
driver: none
networks:
- 'gofiber-net'
# Mongo Express Web-based MongoDB admin interface
mongo_express:
image: mongo-express
container_name: gofiber_mongo-express
depends_on:
- 'mongo'
ports:
- '8081:8081'
restart: always
logging:
driver: none
networks:
- 'gofiber-net'
# Redis
redis:
image: 'redis:6.2-buster'
container_name: gofiber_redis
ports:
- '6379:6379'
restart: always
logging:
driver: none
networks:
- 'gofiber-net'
# Redis Commander
redis-commander:
container_name: gofiber_redis-commander
# hostname: redis-commander
image: rediscommander/redis-commander:latest
depends_on:
- redis
restart: always
environment:
- REDIS_HOSTS=local:redis:6379
ports:
- "8082:8081"
logging:
driver: none
networks:
- 'gofiber-net'
networks:
gofiber-net:
name: gofiber-net