Skip to content

Commit

Permalink
fix aitable
Browse files Browse the repository at this point in the history
  • Loading branch information
chendelin1982 authored Dec 12, 2023
1 parent 4c8d6bb commit a11633d
Show file tree
Hide file tree
Showing 10 changed files with 74 additions and 58 deletions.
32 changes: 21 additions & 11 deletions apps/aitable/.env
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@
W9_VERSION=v0.99.0-alpha_1575
W9_DIST=community
W9_VERSION=latest
W9_POWER_PASSWORD=A1PrMxExC45LsCT

W9_ID=aitable
W9_HTTP_PORT=80
W9_HTTP_PORT_SET=9001
W9_ID=aitable
W9_NETWORK=websoft9
W9_DB_EXPOSE="mysql"
W9_POWER_PASSWORD=A1PrMxExC45LsCT
W9_URL=InternetIP


# AITable offcial environments
# All ther images not have the same tags name except latest
# refer to: https://apitable.getoutline.com/s/947407a5-1ed4-436c-afc6-57c1b6cf647c/doc/546v5akd5yy6yep-VtvcXsQpUW

# Modification: Need change some password, *_HOST

IMAGE_PULL_POLICY=always
IMAGE_REGISTRY=docker.io

IMAGE_BACKEND_SERVER=apitable/backend-server:latest
IMAGE_GATEWAY=apitable/openresty:latest
IMAGE_INIT_DB=apitable/init-db:latest
IMAGE_ROOM_SERVER=apitable/room-server:latest
IMAGE_WEB_SERVER=apitable/web-server:latest

IMAGE_DATABUS_SERVER=apitable/databus-server:latest
IMAGE_IMAGEPROXY_SERVER=apitable/imageproxy-server:latest
IMAGE_INIT_APPDATA=apitable/init-appdata:latest

Expand All @@ -31,7 +39,8 @@ NGINX_HTTP_PORT=80

### SERVER
BACKEND_BASE_URL=http://backend-server:8081/api/v1/
NEST_GRPC_URL=room-server:3334
DATABUS_SERVER_BASE_URL=http://databus-server:8625
ROOM_GRPC_URL=room-server:3334
SOCKET_GRPC_URL=room-server:3007

### NEST CONST
Expand All @@ -41,32 +50,32 @@ OSS_TYPE=QNY1

### MINIO
MINIO_ACCESS_KEY=apitable
MINIO_SECRET_KEY=$W9_POWER_PASSWORD
MINIO_SECRET_KEY=apitable@com

### MYSQL
DATABASE_TABLE_PREFIX=apitable_
MYSQL_DATABASE=apitable
MYSQL_HOST=mysql
MYSQL_HOST=$W9_ID-mysql
MYSQL_PASSWORD=$W9_POWER_PASSWORD
MYSQL_PORT=3306
MYSQL_ROOT_PASSWORD=$W9_POWER_PASSWORD
MYSQL_USERNAME=root

### init-db
DB_HOST=mysql
DB_HOST=$W9_ID-mysql
DB_NAME=apitable
DB_PASSWORD=$W9_POWER_PASSWORD
DB_PORT=3306
DB_USERNAME=root

### REDIS
REDIS_DB=0
REDIS_HOST=redis
REDIS_HOST=$W9_ID-redis
REDIS_PASSWORD=$W9_POWER_PASSWORD
REDIS_PORT=6379

### RabbitMQ
RABBITMQ_HOST=rabbitmq
RABBITMQ_HOST=$W9_ID-rabbitmq
RABBITMQ_PASSWORD=$W9_POWER_PASSWORD
RABBITMQ_PORT=5672
RABBITMQ_USERNAME=apitable
Expand Down Expand Up @@ -102,6 +111,7 @@ SOCKET_URL=http://room-server:3002
SMS_ENABLED=false

MAIL_ENABLED=false
MAIL_FROM=
MAIL_HOST=
MAIL_PASSWORD=
MAIL_PORT=
Expand All @@ -113,13 +123,13 @@ OSS_CLIENT_TYPE=aws
OSS_ENABLED=true

AWS_ACCESS_KEY=apitable
AWS_ACCESS_SECRET=$W9_POWER_PASSWORD
AWS_ACCESS_SECRET=apitable@com
AWS_ENDPOINT=http://minio:9000
AWS_REGION=us-east-1

HUAWEICLOUD_OBS_ACCESS_KEY=apitable
HUAWEICLOUD_OBS_ENDPOINT=obs.cn-south-1.myhuaweicloud.com
HUAWEICLOUD_OBS_SECRET_KEY=$W9_POWER_PASSWORD
HUAWEICLOUD_OBS_SECRET_KEY=apitable@com

ASSETS_BUCKET=assets
ASSETS_URL=assets
Expand Down
47 changes: 26 additions & 21 deletions apps/aitable/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# docs:
# compose:
# modification: use named volumes, restart policy
# docs: https://github.com/apitable/apitable/blob/develop/README.md#installation
# Official docs only provide install.sh, and we have get the From install.sh,
# it is easy to see that it only downloads compose and starts it
# compose: https://github.com/apitable/apitable/blob/develop/docker-compose.yaml

# modifications: Named volumes, restart policy, container_name

version: "3.9"

Expand All @@ -25,8 +28,6 @@ services:
condition: service_started
init-appdata:
condition: service_completed_successfully
env_file:
- .env

web-server:
container_name: $W9_ID-webserver
Expand All @@ -39,7 +40,7 @@ services:
- .env

imageproxy-server:
container_name: $W9_ID-imageproxyserver
container_name: $W9_ID-imageproxy
image: ${IMAGE_REGISTRY}/${IMAGE_IMAGEPROXY_SERVER}
pull_policy: ${IMAGE_PULL_POLICY:-if_not_present}
restart: unless-stopped
Expand All @@ -48,11 +49,9 @@ services:
environment:
- TZ=${TIMEZONE}
- BASEURL=${AWS_ENDPOINT}
env_file:
- .env

backend-server:
container_name: $W9_ID-backendserver
container_name: $W9_ID-backend
image: ${IMAGE_REGISTRY}/${IMAGE_BACKEND_SERVER}
pull_policy: ${IMAGE_PULL_POLICY:-if_not_present}
restart: unless-stopped
Expand All @@ -75,7 +74,7 @@ services:

room-server:
image: ${IMAGE_REGISTRY}/${IMAGE_ROOM_SERVER}
container_name: $W9_ID-roomserver
container_name: $W9_ID-room
pull_policy: ${IMAGE_PULL_POLICY:-if_not_present}
restart: unless-stopped
expose:
Expand All @@ -99,6 +98,21 @@ services:
mysql:
condition: service_healthy

databus-server:
image: ${IMAGE_REGISTRY}/${IMAGE_DATABUS_SERVER}
container_name: $W9_ID-databus
pull_policy: ${IMAGE_PULL_POLICY:-if_not_present}
restart: always
expose:
- "8625"
env_file:
- "${ENV_FILE:-.env}"
environment:
- TZ=${TIMEZONE}
depends_on:
mysql:
condition: service_healthy

minio:
image: ${IMAGE_MINIO}
container_name: $W9_ID-minio
Expand All @@ -122,8 +136,6 @@ services:
interval: 5s
timeout: 5s
retries: 30
env_file:
- .env

redis:
image: ${IMAGE_REDIS}
Expand All @@ -144,8 +156,6 @@ services:
- redis:/data
environment:
- TZ=${TIMEZONE}
env_file:
- .env

mysql:
image: ${IMAGE_MYSQL}
Expand All @@ -160,7 +170,8 @@ services:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- TZ=${TIMEZONE}
command: --default-authentication-plugin=mysql_native_password
command:
--default-authentication-plugin=mysql_native_password
--character-set-server=utf8mb4
--collation-server=utf8mb4_general_ci
--sql_mode=IGNORE_SPACE,NO_ENGINE_SUBSTITUTION
Expand All @@ -171,8 +182,6 @@ services:
timeout: 5s
start_period: 30s
retries: 60
env_file:
- .env

rabbitmq:
image: ${IMAGE_RABBITMQ}
Expand All @@ -188,8 +197,6 @@ services:
environment:
- RABBITMQ_DEFAULT_USER=${RABBITMQ_USERNAME}
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_PASSWORD}
env_file:
- .env

# init data
init-db:
Expand All @@ -208,8 +215,6 @@ services:
depends_on:
mysql:
condition: service_healthy
env_file:
- .env

# init-appdata
init-appdata:
Expand Down
1 change: 0 additions & 1 deletion apps/aitable/variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
{
"dist": "community",
"version": [
"v0.99.0-alpha_1575",
"latest"
]
}
Expand Down
3 changes: 0 additions & 3 deletions apps/akaunting/.env
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ DB_DATABASE=$W9_ID
DB_USERNAME=$W9_ID
DB_PASSWORD=$W9_POWER_PASSWORD

# You should change this to a random string of three numbers or letters followed by an underscore
DB_PREFIX=asd_

# These define the first company to exist on this instance. They are only used during setup.
COMPANY_NAME=My Company
COMPANY_EMAIL=[email protected]
2 changes: 1 addition & 1 deletion apps/akaunting/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
- .env

makaunting-db:
image: mariadb:11.0
image: mariadb:$W9_DB_VERSION
container_name: $W9_ID-mariadb
restart: unless-stopped
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --innodb_log_buffer_size=30M
Expand Down
15 changes: 11 additions & 4 deletions apps/akeneo/.env
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,19 @@ W9_POWER_PASSWORD=UGz0IARz117ssO%
W9_ID=akeneo
W9_HTTP_PORT=80
W9_HTTP_PORT_SET=9001
W9_ES_PORT=9200
W9_ES_PORT_SET=9200
W9_SITENAME=akeneo
W9_USER=admin
W9_PASSWORD=$W9_POWER_PASSWORD
W9_NETWORK=websoft9
W9_DB_EXPOSE="mysql"
W9_URL=appname.example.com
W9_MYSQL_VERSION="8.0"
W9_ES_VERSION="7.10.1"
W9_URL=""
#### ------------------------------------------------------------------------------------------ ####

AKENEO_MYSQL_DATABASE=${W9_ID}
AKENEO_MYSQL_USER=${W9_ID}
AKENEO_MYSQL_PASSWORD=${W9_POWER_PASSWORD}
AKENEO_MYSQL_HOST=$W9_ID-mysql
AKENEO_SITENAME="akeneo"
AKENEO_ADMIN_USER=${W9_USER}
AKENEO_ADMIN_PASSWORD=${W9_POWER_PASSWORD}
3 changes: 3 additions & 0 deletions apps/akeneo/Notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Akeneo

本应用需要重新编写,建议采用官方的 make 方案

## 安装

先阅读官方文档:https://docs.akeneo.com/master/install_pim/docker/installation_docker.html
Expand Down Expand Up @@ -33,6 +35,7 @@
## 常见问题

#### make prod 成功之后,仍然无法访问?

需修正访问根目录的权限 : chown -R www-data:www-data /var/www/html

#### 默认的账号密码是什么?
Expand Down
19 changes: 5 additions & 14 deletions apps/akeneo/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,9 @@ services:
- akeneo:/var/www/html
- ./000-default.conf:/etc/apache2/sites-available/000-default.conf
restart: unless-stopped
environment:
AKENEO_MYSQL_DATABASE: ${W9_ID}
AKENEO_MYSQL_USER: ${W9_ID}
AKENEO_MYSQL_PASSWORD: ${W9_POWER_PASSWORD}
AKENEO_MYSQL_HOST: $W9_ID-mysql
AKENEO_SITENAME: ${W9_SITENAME}
AKENEO_ADMIN_USER: ${W9_USER}
AKENEO_ADMIN_PASSWORD: ${W9_POWER_PASSWORD}

mysql:
image: mysql:8.0
image: mysql:$W9_MYSQL_VERSION
container_name: $W9_ID-mysql
restart: unless-stopped
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
Expand All @@ -32,18 +24,16 @@ services:
MYSQL_USER: ${W9_ID}
MYSQL_PASSWORD: ${W9_POWER_PASSWORD}
MYSQL_ROOT_PASSWORD: ${W9_POWER_PASSWORD}
env_file: .env

elasticsearch:
image: elasticsearch:7.10.1
image: elasticsearch:$W9_ES_VERSION
container_name: ${W9_ID}-elasticsearch
restart: unless-stopped
volumes:
- elasticsearch:/usr/share/elasticsearch/data
environment:
ES_JAVA_OPTS: '${ES_JAVA_OPTS:--Xms512m -Xmx512m}'
discovery.type: 'single-node'
ports:
- '${W9_ES_PORT_SET}:${W9_ES_PORT}'
env_file: .env

networks:
default:
Expand All @@ -53,3 +43,4 @@ networks:
volumes:
akeneo:
mysql:
elasticsearch:
2 changes: 1 addition & 1 deletion apps/akeneo/variables.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "akeneo",
"trademark": "Akeneo",
"release": true,
"release": false,
"fork_url": "https://github.com/akeneo/pim-community-dev",
"edition": [
{
Expand Down
8 changes: 6 additions & 2 deletions apps/ansible/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# refer to:
# refer to: https://learn.microsoft.com/en-us/azure/developer/ansible/configure-in-docker-container

FROM centos:centos7
FROM ghcr.io/ansible-community/community-ee-base:latest

LABEL maintainer="[email protected]"
LABEL version="latest"
LABEL description="Ansible"

ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8

WORKDIR "/ansible/project"

# Install ansible
Expand All @@ -24,4 +28,4 @@ RUN git clone https://github.com/Websoft9/role_template
VOLUME "/ansible/project"

# Define the entry point for the docker container.
ENTRYPOINT ["tail", "-f", "/dev/null"]
ENTRYPOINT ["tail", "-f", "/dev/null"]

0 comments on commit a11633d

Please sign in to comment.