增加固定IP配置。对应修改readme
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
|
||||
version: "3.4"
|
||||
|
||||
# setting networks. important when connecting other containers.
|
||||
networks:
|
||||
gitea:
|
||||
external:
|
||||
name: nginxdocker_default
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.16.0/20
|
||||
|
||||
services:
|
||||
server:
|
||||
@@ -16,10 +19,11 @@ services:
|
||||
- DB_HOST=db:3306
|
||||
- DB_NAME=gitea
|
||||
- DB_USER=gitea
|
||||
- DB_PASSWD=pwd
|
||||
- DB_PASSWD=dbpwd
|
||||
restart: always
|
||||
networks:
|
||||
- gitea
|
||||
gitea:
|
||||
ipv4_address: 192.168.16.15
|
||||
volumes:
|
||||
- ./gitea:/data
|
||||
ports:
|
||||
@@ -29,14 +33,17 @@ services:
|
||||
- db
|
||||
|
||||
db:
|
||||
image: "mysql:5.7.27"
|
||||
image: "mysql/mysql-server"
|
||||
restart: always
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=rootpwd
|
||||
- MYSQL_ROOT_PASSWORD=dbrootpwd
|
||||
- MYSQL_USER=gitea
|
||||
- MYSQL_PASSWORD=pwd
|
||||
- MYSQL_PASSWORD=dbpwd
|
||||
- MYSQL_DATABASE=gitea
|
||||
networks:
|
||||
- gitea
|
||||
gitea:
|
||||
ipv4_address: 192.168.16.14
|
||||
volumes:
|
||||
- ./mysql:/var/lib/mysql
|
||||
- ./mysql/config/my.cnf:/etc/my.cnf
|
||||
- ./mysql/data:/var/lib/mysql
|
||||
- ./mysql/init:/docker-entrypoint-initdb.d
|
||||
Reference in New Issue
Block a user