This commit is contained in:
2022-07-06 10:07:32 +08:00
committed by jhx
parent 54e265dd61
commit 987c04596c
2 changed files with 8 additions and 23 deletions
+2 -12
View File
@@ -1,10 +1,9 @@
version: '3'
services:
machine_server:
server:
build:
context: ./
args:
- CONTAINER_PORT=${CONTAINER_PORT}
- CONTAINER_APP_DIR=${CONTAINER_APP_DIR}
- INSTALL_COMPOSER=${INSTALL_COMPOSER}
- COMPOSER_INSTALLER=${COMPOSER_INSTALLER}
@@ -14,7 +13,6 @@ services:
- CHANGE_AlPINE_SOURCE=${CHANGE_AlPINE_SOURCE}
ports:
- "${HOST_PORT_1}:${CONTAINER_PORT_1}"
- "${HOST_PORT_2}:${CONTAINER_PORT_2}"
volumes:
- ${HOST_APP_DIR}:${CONTAINER_APP_DIR}
- ./id_rsa:/root/.ssh/id_rsa:ro
@@ -24,12 +22,10 @@ services:
tty: true
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- machine_network
#restart: always
#entrypoint: [ "php", "/usr/src/myapp/main.php", "start" ]
machine_redis_server:
redis_server:
build:
context: ./redis
args:
@@ -44,9 +40,3 @@ services:
entrypoint: [ "redis-server", "/etc/redis.conf" ]
environment:
TZ: "$TZ"
networks:
- machine_network
networks:
machine_network:
+5 -10
View File
@@ -1,14 +1,12 @@
# base
CONTAINER_NAME=center
COMPOSE_PROJECT_NAME=ipcheck
CONTAINER_NAME=ipcheck
# port
HOST_PORT_1=8000
HOST_PORT_1=9001
CONTAINER_PORT_1=8000
HOST_PORT_2=3000
CONTAINER_PORT_2=3000
REDIS_HOST_PORT=63790
REDIS_HOST_PORT=6000
### set local app dir there #######
HOST_APP_DIR=../
@@ -18,7 +16,7 @@ COMPOSER_INSTALLER=https://install.phpcomposer.com/installer
COMPOSER_MIRROR=https://mirrors.aliyun.com/composer/
INSTALL_LIB_EVENT=true
CHANGE_AlPINE_SOURCE=true
CONTAINER_PACKAGE_URL=mirrors.aliyun.com
CONTAINER_PACKAGE_URL=mirrors.ustc.edu.cn
DATA_DIR=./data
#
@@ -30,8 +28,5 @@ TZ=Asia/Shanghai
REDIS_VERSION=6.2-alpine
REDIS_CONF_FILE=./redis/config/redis-6.conf
#apidoc
APIDOC_HOST_PORT=4000
APIDOC_NGINX_CONFD_DIR=./apidoc/nginx/conf.d