From 987c04596cc2c80ca692418a8d7006fdde425783 Mon Sep 17 00:00:00 2001 From: woon Date: Wed, 6 Jul 2022 10:07:32 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/docker-compose-example.yaml | 16 +++------------- docker/env-example | 15 +++++---------- 2 files changed, 8 insertions(+), 23 deletions(-) diff --git a/docker/docker-compose-example.yaml b/docker/docker-compose-example.yaml index 4319a02..4103823 100644 --- a/docker/docker-compose-example.yaml +++ b/docker/docker-compose-example.yaml @@ -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: @@ -43,10 +39,4 @@ services: restart: always entrypoint: [ "redis-server", "/etc/redis.conf" ] environment: - TZ: "$TZ" - networks: - - machine_network - - -networks: - machine_network: \ No newline at end of file + TZ: "$TZ" \ No newline at end of file diff --git a/docker/env-example b/docker/env-example index 8c85e4d..0d4d8f1 100644 --- a/docker/env-example +++ b/docker/env-example @@ -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