这是我的~/docker-webdev-stack/docker-compose.yml
services:
dns-server:
container_name: dns-server
hostname: dns-server
image: technitium/dns-server:latest
# For DHCP deployments, use "host" network mode and remove all the port mappings, including the ports array by commenting them
# network_mode: "host"
ports:
- "5380:5380/tcp" #DNS web console (HTTP)
- "53443:53443/tcp" #DNS web console (HTTPS)
- "53:53/udp" #DNS service
- "53:53/tcp" #DNS service
environment:
- DNS_SERVER_DOMAIN=dns-server #The primary domain name used by this DNS Server to identify itself.
- DNS_SERVER_ADMIN_PASSWORD=password #DNS web console admin user password.
- DNS_SERVER_WEB_SERVICE_HTTP_PORT=5380 #The TCP port number for the DNS web console over HTTP protocol.
- DNS_SERVER_WEB_SERVICE_HTTPS_PORT=53443 #The TCP port number for the DNS web console over HTTPS protocol.
- DNS_SERVER_WEB_SERVICE_ENABLE_HTTPS=true #Enables HTTPS for the DNS web console.
- DNS_SERVER_WEB_SERVICE_USE_SELF_SIGNED_CERT=false #Enables self signed TLS certificate for the DNS web console.
- DNS_SERVER_ENABLE_BLOCKING=false #Sets the DNS server to block domain names using Blocked Zone and Block List Zone.
- DNS_SERVER_FORWARDERS=1.1.1.1, 8.8.8.8 #Comma separated list of forwarder addresses.
- DNS_SERVER_LOG_USING_LOCAL_TIME=true #Enable this option to use local time instead of UTC for logging.
volumes:
- config:/etc/dns
networks:
dns-network:
ipv4_address: 10.0.0.2
restart: always
sysctls:
- net.ipv4.ip_local_port_range=1024 65000
gitea-server:
image: gitea/gitea:1.17.3
container_name: gitea
environment:
- USER_UID=1000
- USER_GID=1000
- GITEA__database__DB_TYPE=mysql
- GITEA__database__HOST=gitea-db:3306
- GITEA__database__NAME=gitea
- GITEA__database__USER=gitea
- GITEA__database__PASSWD=gitea
restart: always
networks:
- dns-network
dns: 10.0.0.2
volumes:
- ./gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- /etc/ssl/myCA.crt:/usr/local/share/ca-certificates/myCA.crt:ro
ports:
- "3000:3000"
- "222:22"
depends_on:
- gitea-db
- dns-server
gitea-db:
image: mysql:8
container_name: gitea-db
restart: unless-stopped
depends_on:
- dns-server
environment:
- MYSQL_ROOT_PASSWORD=gitea
- MYSQL_USER=gitea
- MYSQL_PASSWORD=gitea
- MYSQL_DATABASE=gitea
networks:
- dns-network
volumes:
- ./mysql:/var/lib/mysql
jenkins:
image: jenkins/jenkins:lts
container_name: jenkins
depends_on:
- dns-server
user: root
ports:
- "35000:8080"
restart: unless-stopped
volumes:
- jenkins_home:/var/jenkins_home
- /etc/ssl/myCA.pem:/usr/local/share/ca-certificates/myCA.crt:ro
- /home/david/docker-webdev-stack/jenkins/run.sh:/var/jenkins_home/run.sh:ro
- /home/david/docker-webdev-stack/jenkins/ssh-keys:/var/jenkins_home/.ssh
networks:
- dns-network
dns: 10.0.0.2
volumes:
config:
jenkins_home:
networks:
dns-network:
name: dns-network
driver: bridge
ipam:
config:
- subnet: 10.0.0.0/16
无论出于什么原因,当我重新启动服务器时,即使我已经重新启动,restart: always
也会收到此信息:
david<webdev>~