feat: docker-compose yml file support defined networks and update control service
This commit is contained in:
@@ -15,6 +15,9 @@ services:
|
||||
- "8848:8848"
|
||||
- "9848:9848"
|
||||
- "9849:9849"
|
||||
networks:
|
||||
- wfc-fe-network
|
||||
- wfc-be-network
|
||||
depends_on:
|
||||
- wfc-mysql
|
||||
restart: unless-stopped
|
||||
@@ -25,6 +28,9 @@ services:
|
||||
context: ./mysql
|
||||
ports:
|
||||
- "3306:3306"
|
||||
networks:
|
||||
- wfc-be-network
|
||||
- wfc-fe-network
|
||||
volumes:
|
||||
- ./mysql/db:/docker-entrypoint-initdb.d
|
||||
- ./mysql/conf:/etc/mysql/conf.d
|
||||
@@ -50,6 +56,8 @@ services:
|
||||
context: ./redis
|
||||
ports:
|
||||
- "6379:6379"
|
||||
networks:
|
||||
- wfc-be-network
|
||||
volumes:
|
||||
- ./redis/conf/redis.conf:/home/wfc/redis/redis.conf
|
||||
- ./redis/data:/data
|
||||
@@ -62,6 +70,9 @@ services:
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "8080:8080"
|
||||
networks:
|
||||
- wfc-be-network
|
||||
- wfc-fe-network
|
||||
volumes:
|
||||
- ./wfc/gateway/jar/wfc-gateway.jar:/home/wfc/wfc-gateway.jar
|
||||
depends_on:
|
||||
@@ -79,6 +90,8 @@ services:
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "9200:9200"
|
||||
networks:
|
||||
- wfc-be-network
|
||||
volumes:
|
||||
- ./wfc/auth/jar/wfc-auth.jar:/home/wfc/wfc-auth.jar
|
||||
depends_on:
|
||||
@@ -96,6 +109,8 @@ services:
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "9201:9201"
|
||||
networks:
|
||||
- wfc-be-network
|
||||
volumes:
|
||||
- ./wfc/modules/system/jar/wfc-modules-system.jar:/home/wfc/wfc-modules-system.jar
|
||||
depends_on:
|
||||
@@ -115,6 +130,8 @@ services:
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "9204:9204"
|
||||
networks:
|
||||
- wfc-be-network
|
||||
volumes:
|
||||
- ./wfc/modules/user/jar/wfc-modules-user.jar:/home/wfc/wfc-modules-user.jar
|
||||
depends_on:
|
||||
@@ -134,6 +151,8 @@ services:
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "9203:9203"
|
||||
networks:
|
||||
- wfc-be-network
|
||||
volumes:
|
||||
- ./wfc/modules/job/jar/wfc-modules-job.jar:/home/wfc/wfc-modules-job.jar
|
||||
depends_on:
|
||||
@@ -151,6 +170,8 @@ services:
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "9306:9306"
|
||||
networks:
|
||||
- wfc-be-network
|
||||
volumes:
|
||||
- ./wfc/modules/payment/jar/wfc-modules-payment.jar:/home/wfc/wfc-modules-payment.jar
|
||||
depends_on:
|
||||
@@ -168,6 +189,8 @@ services:
|
||||
context: ./nginx
|
||||
ports:
|
||||
- "80:80"
|
||||
networks:
|
||||
- wfc-fe-network
|
||||
volumes:
|
||||
- ./nginx/html/dist:/home/wfc/portal
|
||||
- ./nginx/conf/nginx.conf:/etc/nginx/nginx.conf
|
||||
@@ -180,3 +203,12 @@ services:
|
||||
environment:
|
||||
- GATEWAY_ADDR=${GATEWAY_ADDR}
|
||||
restart: unless-stopped
|
||||
|
||||
networks:
|
||||
wfc-fe-network:
|
||||
driver: bridge
|
||||
wfc-be-network:
|
||||
driver: bridge
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 172.18.0.0/16
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
[Unit]
|
||||
Description=WANFi Controller Service
|
||||
After=network.target
|
||||
Description=WANFi Control and Billing System
|
||||
After=network.target docker.service
|
||||
Requires=network.target docker.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
#WorkingDirectory=/opt/wfc/docker
|
||||
ExecStart=/opt/wfc/bin/wfccontrol.sh start
|
||||
ExecStop=/opt/wfc/bin/wfccontrol.sh stop
|
||||
ExecReload=/opt/wfc/bin/wfccontrol.sh status
|
||||
ExecStartPost=/opt/wfc/bin/wfccontrol.sh version
|
||||
PIDFile=/var/run/wfccontrol.pid
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
WorkingDirectory=/opt/wfc/docker
|
||||
ExecStart=docker-compose start
|
||||
ExecStop=docker-compose stop
|
||||
ExecReload=docker-compose restart
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user