-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
74 lines (70 loc) · 2.52 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"
#================================================================================================
# NETWORK SETUP
#================================================================================================
networks:
devopscorner_net:
name: devopscorner_net
driver: bridge
ipam:
config:
- subnet: 172.148.148.0/16
#================================================================================================
# VOLUME SETUP
#================================================================================================
volumes:
vol_portainer:
driver: ${VOLUMES_DRIVER:-local}
driver_opts:
o: bind
type: none
device: ${DATA_PORTAINER:-/opt/data/docker/portainer2.9}
vol_go_demo:
driver: ${VOLUMES_DRIVER:-local}
driver_opts:
o: bind
type: none
device: ${DATA_GO_DEMO:-/opt/data/docker/go-demo}
services:
#================================================================================================
# PORTAINER
#================================================================================================
portainer:
image: dockerframework/portainer:${PORTAINER_VERSION:-2.9}
container_name: ${CONTAINER_PORTAINER:-devopscorner_portainer}
restart: unless-stopped
ports:
- "${PORT_PORTAINER:-5212}:9000"
volumes:
# - /etc/localtime:/etc/localtime:ro ## Do not use it in mac
# - /var/run/docker.sock:/var/run/docker.sock ## Do not use it in k8s
- vol_portainer:/data
environment:
- PORTAINER_TEMPLATE=generic
- PORTAINER_VERSION=${PORTAINER_VERSION:-2.9}
privileged: true
networks:
devopscorner_net:
ipv4_address: ${CONTAINER_IP_PORTAINER:-172.148.148.5}
#================================================================================================
# GOLANG-DEMO
#================================================================================================
go-demo:
build:
context: .
dockerfile: Dockerfile
container_name: ${CONTAINER_GO_DEMO:-devopscorner_go_demo}
restart: unless-stopped
ports:
- "${PORT_GO_DEMO:-8080}:8080"
volumes:
# - /etc/localtime:/etc/localtime:ro ## Do not use it in mac
- /var/run/docker.sock:/var/run/docker.sock ## Do not use it in k8s
environment:
- TZ="Asia/Jakarta"
- ALPINE_VERSION=${ALPINE_VERSION:-3.16}
privileged: true
tty: true
networks:
devopscorner_net:
ipv4_address: ${CONTAINER_IP_GO_DEMO:-172.148.148.225}