-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
63 lines (63 loc) · 1.45 KB
/
docker-compose.yaml
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
version: "3"
services:
mysql:
image: mysql
container_name: gogs_mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: qwer4321
MYSQL_DATABASE: gogs
ports:
- "10036:3306"
volumes:
- ./mysql/config:/etc/mysql/conf.d
- ./mysql/db:/var/lib/mysql
- ./mysql/conf/my.cnf:/etc/my.cnf
- ./mysql/init:/docker-entrypoint-initdb.d/
networks:
gogs_app:
aliases:
- mysql
gogs:
image: gogs/gogs
container_name: gogs
restart: always
ports:
- "8190:3000"
- "10022:22"
depends_on:
- mysql
volumes:
- ./data:/data
networks:
gogs_app:
aliases:
- gogs_main
etcd:
hostname: etcd
image: bitnami/etcd:3
deploy:
replicas: 1
restart_policy:
condition: on-failure
ports:
- "12379:2379"
- "12380:2380"
volumes:
- "./etcd/data:/opt/bitnami/etcd/data"
environment:
- "ETCD_ADVERTISE_CLIENT_URLS=http://0.0.0.0:2379"
- "ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379"
- "ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380"
- "ETCD_INITIAL_ADVERTISE_PEER_URLS=http://0.0.0.0:2380"
- "ALLOW_NONE_AUTHENTICATION=yes"
- "ETCD_INITIAL_CLUSTER=node1=http://0.0.0.0:2380"
- "ETCD_NAME=node1"
- "ETCD_DATA_DIR=/opt/bitnami/etcd/data"
networks:
gogs_app:
aliases:
- etcd
networks:
gogs_app:
driver: bridge