add wait tool for docker-compose

This commit is contained in:
Ulric Qin 2022-05-11 12:42:08 +08:00
parent e89760f374
commit 9d434a36d6
2 changed files with 13 additions and 12 deletions

View File

@ -3,7 +3,8 @@ FROM python:2
WORKDIR /app WORKDIR /app
ADD n9e /app ADD n9e /app
RUN mkdir -p /app/pub ADD http://download.flashcat.cloud/wait /wait
RUN mkdir -p /app/pub && chmod +x /wait
ADD pub /app/pub/ ADD pub /app/pub/
RUN chmod +x n9e RUN chmod +x n9e

View File

@ -63,6 +63,7 @@ services:
environment: environment:
GIN_MODE: release GIN_MODE: release
TZ: Asia/Shanghai TZ: Asia/Shanghai
WAIT_HOSTS: mysql:3306
ports: ports:
- "10090:10090" - "10090:10090"
- "20090:20090" - "20090:20090"
@ -74,18 +75,18 @@ services:
- mysql - mysql
links: links:
- mysql:mysql - mysql:mysql
command: command: >
- "/app/ibex" sh -c "/wait && /app/ibex server"
- "server"
nwebapi: nwebapi:
image: ulric2019/nightingale:5.7.0 image: ulric2019/nightingale:5.7.1
container_name: nwebapi container_name: nwebapi
hostname: nwebapi hostname: nwebapi
restart: always restart: always
environment: environment:
GIN_MODE: release GIN_MODE: release
TZ: Asia/Shanghai TZ: Asia/Shanghai
WAIT_HOSTS: mysql:3306, redis:6379
volumes: volumes:
- ./n9eetc:/app/etc - ./n9eetc:/app/etc
ports: ports:
@ -102,18 +103,18 @@ services:
- redis:redis - redis:redis
- prometheus:prometheus - prometheus:prometheus
- ibex:ibex - ibex:ibex
command: command: >
- "/app/n9e" sh -c "/wait && /app/n9e webapi"
- "webapi"
nserver: nserver:
image: ulric2019/nightingale:5.7.0 image: ulric2019/nightingale:5.7.1
container_name: nserver container_name: nserver
hostname: nserver hostname: nserver
restart: always restart: always
environment: environment:
GIN_MODE: release GIN_MODE: release
TZ: Asia/Shanghai TZ: Asia/Shanghai
WAIT_HOSTS: mysql:3306, redis:6379
volumes: volumes:
- ./n9eetc:/app/etc - ./n9eetc:/app/etc
ports: ports:
@ -130,9 +131,8 @@ services:
- redis:redis - redis:redis
- prometheus:prometheus - prometheus:prometheus
- ibex:ibex - ibex:ibex
command: command: >
- "/app/n9e" sh -c "/wait && /app/n9e server"
- "server"
telegraf: telegraf:
image: "telegraf:1.20.3" image: "telegraf:1.20.3"