Skip to content

Commit

Permalink
fix aitable
Browse files Browse the repository at this point in the history
  • Loading branch information
chendelin1982 authored Dec 5, 2023
1 parent a5d4606 commit 63cf035
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 54 deletions.
3 changes: 3 additions & 0 deletions apps/aitable/.env
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ W9_DB_EXPOSE="mysql"
W9_POWER_PASSWORD=A1PrMxExC45LsCT
W9_URL=InternetIP


# AITable offcial environments
# refer to: https://apitable.getoutline.com/s/947407a5-1ed4-436c-afc6-57c1b6cf647c/doc/546v5akd5yy6yep-VtvcXsQpUW
IMAGE_PULL_POLICY=always
IMAGE_REGISTRY=docker.io
IMAGE_BACKEND_SERVER=apitable/backend-server:latest
Expand Down
118 changes: 64 additions & 54 deletions apps/aitable/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,63 @@
# docs:
# compose:
# modification: use named volumes, restart policy

version: "3.9"

services:
gateway:
image: ${IMAGE_REGISTRY}/${IMAGE_GATEWAY}
container_name: $W9_ID
pull_policy: ${IMAGE_PULL_POLICY:-if_not_present}
restart: unless-stopped
ports:
- ${W9_HTTP_PORT_SET}:${W9_HTTP_PORT}
environment:
- TZ=${TIMEZONE}
depends_on:
web-server:
condition: service_started
imageproxy-server:
condition: service_started
backend-server:
condition: service_healthy
room-server:
condition: service_started
init-appdata:
condition: service_completed_successfully
env_file:
- .env

web-server:
container_name: $W9_ID-webserver
image: ${IMAGE_REGISTRY}/${IMAGE_WEB_SERVER}
pull_policy: ${IMAGE_PULL_POLICY:-if_not_present}
restart: always
restart: unless-stopped
expose:
- "8080"
env_file:
- "${ENV_FILE:-.env}"
- .env

imageproxy-server:
container_name: $W9_ID-imageproxyserver
image: ${IMAGE_REGISTRY}/${IMAGE_IMAGEPROXY_SERVER}
pull_policy: ${IMAGE_PULL_POLICY:-if_not_present}
restart: always
restart: unless-stopped
expose:
- "8080"
environment:
- TZ=${TIMEZONE}
- BASEURL=${AWS_ENDPOINT}
env_file:
- "${ENV_FILE:-.env}"
- .env

backend-server:
container_name: $W9_ID-backendserver
image: ${IMAGE_REGISTRY}/${IMAGE_BACKEND_SERVER}
pull_policy: ${IMAGE_PULL_POLICY:-if_not_present}
restart: always
restart: unless-stopped
env_file:
- "${ENV_FILE:-.env}"
- .env
expose:
- "8081"
environment:
Expand All @@ -47,10 +74,10 @@ services:
retries: 60

room-server:
container_name: $W9_ID-roomserver
image: ${IMAGE_REGISTRY}/${IMAGE_ROOM_SERVER}
container_name: $W9_ID-roomserver
pull_policy: ${IMAGE_PULL_POLICY:-if_not_present}
restart: always
restart: unless-stopped
expose:
- "3333"
- "3334"
Expand All @@ -60,7 +87,7 @@ services:
- "3005"
- "3007"
env_file:
- "${ENV_FILE:-.env}"
- .env
environment:
- TZ=${TIMEZONE}
- NODE_ENV=${ENV}
Expand All @@ -72,42 +99,18 @@ services:
mysql:
condition: service_healthy

# Third Party Dockers
gateway:
container_name: $W9_ID
image: ${IMAGE_REGISTRY}/${IMAGE_GATEWAY}
pull_policy: ${IMAGE_PULL_POLICY:-if_not_present}
restart: always
ports:
- ${W9_HTTP_PORT_SET}:${W9_HTTP_PORT}
environment:
- TZ=${TIMEZONE}
depends_on:
web-server:
condition: service_started
imageproxy-server:
condition: service_started
backend-server:
condition: service_healthy
room-server:
condition: service_started
init-appdata:
condition: service_completed_successfully
env_file:
- "${ENV_FILE:-.env}"

minio:
container_name: minio
image: ${IMAGE_MINIO}
container_name: $W9_ID-minio
pull_policy: ${IMAGE_PULL_POLICY:-if_not_present}
restart: always
restart: unless-stopped
command: server --console-address ":9001" /data
expose:
- "9000"
- "9001"
volumes:
- ${DATA_PATH}/.data/minio/data:/data
- ${DATA_PATH}/.data/minio/config:/root/.minio
- minio_data:/data
- minio_config:/root/.minio
environment:
- MINIO_ACCESS_KEY=${MINIO_ACCESS_KEY}
- MINIO_SECRET_KEY=${MINIO_SECRET_KEY}
Expand All @@ -120,13 +123,13 @@ services:
timeout: 5s
retries: 30
env_file:
- "${ENV_FILE:-.env}"
- .env

redis:
container_name: $W9_ID-redis
image: ${IMAGE_REDIS}
container_name: $W9_ID-redis
pull_policy: ${IMAGE_PULL_POLICY:-if_not_present}
restart: always
restart: unless-stopped
command:
[
"redis-server",
Expand All @@ -138,19 +141,19 @@ services:
expose:
- "6379"
volumes:
- ${DATA_PATH}/.data/redis:/data
- redis:/data
environment:
- TZ=${TIMEZONE}
env_file:
- "${ENV_FILE:-.env}"
- .env

mysql:
container_name: $W9_ID-mysql
image: ${IMAGE_MYSQL}
container_name: $W9_ID-mysql
pull_policy: ${IMAGE_PULL_POLICY:-if_not_present}
restart: always
restart: unless-stopped
volumes:
- ${DATA_PATH}/.data/mysql:/var/lib/mysql
- mysql:/var/lib/mysql
expose:
- "3306"
environment:
Expand All @@ -169,15 +172,15 @@ services:
start_period: 30s
retries: 60
env_file:
- "${ENV_FILE:-.env}"
- .env

rabbitmq:
image: ${IMAGE_RABBITMQ}
pull_policy: ${IMAGE_PULL_POLICY:-if_not_present}
restart: always
container_name: $W9_ID-rabbitmq
pull_policy: ${IMAGE_PULL_POLICY:-if_not_present}
restart: unless-stopped
volumes:
- ${DATA_PATH}/.data/rabbitmq:/var/lib/rabbitmq
- rabbitmq:/var/lib/rabbitmq
expose:
- "5671"
- "5672"
Expand All @@ -186,13 +189,13 @@ services:
- RABBITMQ_DEFAULT_USER=${RABBITMQ_USERNAME}
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_PASSWORD}
env_file:
- "${ENV_FILE:-.env}"
- .env

# init data
init-db:
image: ${IMAGE_REGISTRY}/${IMAGE_INIT_DB}
pull_policy: ${IMAGE_PULL_POLICY:-if_not_present}
container_name: $W9_ID-initdb
pull_policy: ${IMAGE_PULL_POLICY:-if_not_present}
environment:
- TZ=${TIMEZONE}
- DB_HOST=${MYSQL_HOST}
Expand All @@ -206,15 +209,15 @@ services:
mysql:
condition: service_healthy
env_file:
- "${ENV_FILE:-.env}"
- .env

# init-appdata
init-appdata:
image: ${IMAGE_REGISTRY}/${IMAGE_INIT_APPDATA}
pull_policy: ${IMAGE_PULL_POLICY:-if_not_present}
container_name: $W9_ID-initappdata
pull_policy: ${IMAGE_PULL_POLICY:-if_not_present}
env_file:
- "${ENV_FILE:-.env}"
- .env
depends_on:
mysql:
condition: service_healthy
Expand All @@ -225,3 +228,10 @@ networks:
default:
name: ${W9_NETWORK}
external: true

volumes:
redis:
mysql:
minio_data:
minio_config:
rabbitmq:

0 comments on commit 63cf035

Please sign in to comment.