-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
74 lines (68 loc) · 1.27 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
version: '3.8'
networks:
go-app:
driver: bridge
services:
app:
container_name: golang-api
build: .
ports:
- "8080:8080"
restart: on-failure
volumes:
- ./api:/usr/src/app/
depends_on:
- db
networks:
- go-app
db:
image: mariadb
environment:
- MYSQL_ROOT_PASSWORD=test
- MYSQL_DATABASE=golang_api
ports:
- "3306:3306"
volumes:
- ./database:/var/lib/mysql
networks:
- go-app
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: phymyadmin
depends_on:
- db
environment:
- PMA_HOST=db
- PMA_USER=${DB_USER}
- PMA_PASSWORD=${DB_PASS}
- PMA_PORT=3306
restart: always
ports:
- "8085:80"
volumes:
- /sessions
links:
- db
networks:
- go-app
portainer:
image: portainer/portainer-ce:latest
container_name: portainer
restart: always
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./portainer-data:/data
ports:
- "9000:9000"
networks:
- go-app
cache:
image: redis:alpine
restart: always
volumes:
- ./redis-data:/data
ports:
- "6379:6379"
networks:
- go-app