From a77516bfae8a6e83db2ce51dfbe50a0650a22895 Mon Sep 17 00:00:00 2001 From: qiaofeng1227 <76487013@qq.com> Date: Fri, 29 Dec 2023 08:43:35 +0800 Subject: [PATCH] seafile --- apps/scratch/.env | 10 ++--- apps/scratch/docker-compose.yml | 2 +- apps/scratch/src/after_up.sh | 1 - apps/scratch/src/filelist | 3 -- apps/scratch/variables.json | 2 +- apps/seafile/.env | 12 ++--- apps/seafile/docker-compose-pro.yml | 69 +++++++++++++++++++++++++++++ apps/seafile/docker-compose.yml | 55 ++--------------------- 8 files changed, 84 insertions(+), 70 deletions(-) delete mode 100644 apps/scratch/src/after_up.sh delete mode 100644 apps/scratch/src/filelist create mode 100644 apps/seafile/docker-compose-pro.yml diff --git a/apps/scratch/.env b/apps/scratch/.env index fe5ee0787..aa9534f91 100644 --- a/apps/scratch/.env +++ b/apps/scratch/.env @@ -1,13 +1,11 @@ -W9_ID=scratch +W9_DIST=community W9_VERSION=v3.0 - W9_REPO=websoft9dev/scratch + #### -- Not allowed to edit below environments when recreate app based on existing data -- #### +W9_ID=scratch W9_HTTP_PORT=80 W9_HTTP_PORT_SET=9001 - -W9_NETWORK=websoft9 -W9_URL_REPLACE=false W9_URL=appname.example.com -W9_DIST=community +W9_NETWORK=websoft9 #### --------------------------------------------------------------------------------------- #### diff --git a/apps/scratch/docker-compose.yml b/apps/scratch/docker-compose.yml index 2d639d5be..2b72e3d67 100644 --- a/apps/scratch/docker-compose.yml +++ b/apps/scratch/docker-compose.yml @@ -10,7 +10,7 @@ services: restart: unless-stopped env_file: .env ports: - - "${W9_HTTP_PORT_SET}:${W9_HTTP_PORT}" + - ${W9_HTTP_PORT_SET}:80 volumes: - scratch:/usr/share/nginx/html networks: diff --git a/apps/scratch/src/after_up.sh b/apps/scratch/src/after_up.sh deleted file mode 100644 index 8b1378917..000000000 --- a/apps/scratch/src/after_up.sh +++ /dev/null @@ -1 +0,0 @@ - diff --git a/apps/scratch/src/filelist b/apps/scratch/src/filelist deleted file mode 100644 index 341240aed..000000000 --- a/apps/scratch/src/filelist +++ /dev/null @@ -1,3 +0,0 @@ -docker-compose.yml -script/test.sh -docker \ No newline at end of file diff --git a/apps/scratch/variables.json b/apps/scratch/variables.json index 4ff077043..58c6168b0 100644 --- a/apps/scratch/variables.json +++ b/apps/scratch/variables.json @@ -7,7 +7,7 @@ { "dist": "community", "version": [ - "v2.3.13", + "v3.0", "latest" ] } diff --git a/apps/seafile/.env b/apps/seafile/.env index 9c1399d49..773068b0e 100644 --- a/apps/seafile/.env +++ b/apps/seafile/.env @@ -1,18 +1,18 @@ W9_POWER_PASSWORD=uQ8E1wVTzG8SOk3! - +W9_DIST=community W9_VERSION=11.0.0 -W9_ID=seafile -W9_TIME_ZONE=Etc/UTC + W9_REPO=seafileltd/seafile-mc #### -- Not allowed to edit below environments when recreate app based on existing data -- #### +W9_ID=seafile W9_HTTP_PORT=80 W9_HTTP_PORT_SET=9001 - -W9_NETWORK=websoft9 W9_LOGIN_USER=me@example.com W9_LOGIN_PASSWORD=$W9_POWER_PASSWORD W9_URL_REPLACE=true W9_URL=appname.example.com -W9_DIST=community +W9_TIME_ZONE=Etc/UTC W9_DB_EXPOSE="mariadb" +W9_DB_VERSION="10.5" +W9_NETWORK=websoft9 #### --------------------------------------------------------------------------------------- #### \ No newline at end of file diff --git a/apps/seafile/docker-compose-pro.yml b/apps/seafile/docker-compose-pro.yml new file mode 100644 index 000000000..b44931ed5 --- /dev/null +++ b/apps/seafile/docker-compose-pro.yml @@ -0,0 +1,69 @@ +version: "3.8" +services: + mariadb: + image: mariadb:10.5 + container_name: $W9_ID-mariadb + restart: unless-stopped + environment: + - MYSQL_ROOT_PASSWORD=$W9_POWER_PASSWORD + - MYSQL_LOG_CONSOLE=true + volumes: + - mysql_data:/var/lib/mysql + + memcached: + image: memcached:1.6 + container_name: $W9_ID-memcached + restart: unless-stopped + entrypoint: memcached -m 256 + + elasticsearch: + image: seafileltd/elasticsearch-with-ik:5.6.16 + container_name: $W9_ID-elasticsearch + restart: unless-stopped + environment: + - discovery.type=single-node + - bootstrap.memory_lock=true + - "ES_JAVA_OPTS=-Xms1g -Xmx1g" + ulimits: + memlock: + soft: -1 + hard: -1 + deploy: + resources: + limits: + memory: 2G + volumes: + - elasticsearch_data:/usr/share/elasticsearch/data # Requested, specifies the path to Elasticsearch data persistent store. + + seafile-pro: + image: docker.seafile.top/seafileltd/seafile-pro-mc:$W9_VERSION + container_name: $W9_ID + restart: unless-stopped + ports: + - "$W9_HTTP_PORT_SET:$W9_HTTP_PORT" + # - "443:443" # If https is enabled, cancel the comment. + volumes: + - seafile_data:/shared # Requested, specifies the path to Seafile data persistent store. + env_file: .env + environment: + - DB_HOST=$W9_ID-mariadb + - DB_ROOT_PASSWD=$W9_POWER_PASSWORD + - TIME_ZONE=$W9_TIME_ZONE + - SEAFILE_ADMIN_EMAIL=$W9_LOGIN_USER + - SEAFILE_ADMIN_PASSWORD=$W9_LOGIN_PASSWORD + - SEAFILE_SERVER_LETSENCRYPT=false + - SEAFILE_SERVER_HOSTNAME=$W9_URL + depends_on: + - mariadb + - memcached + - elasticsearch + +networks: + default: + name: ${W9_NETWORK} + external: true + +volumes: + seafile_data: + elasticsearch_data: + mysql_data: diff --git a/apps/seafile/docker-compose.yml b/apps/seafile/docker-compose.yml index 891602d47..66fad2040 100644 --- a/apps/seafile/docker-compose.yml +++ b/apps/seafile/docker-compose.yml @@ -1,7 +1,7 @@ version: "3.8" services: - db: - image: mariadb:10.5 + mariadb: + image: mariadb:$W9_DB_VERSION container_name: $W9_ID-mariadb restart: unless-stopped environment: @@ -9,61 +9,12 @@ services: - MYSQL_LOG_CONSOLE=true volumes: - mysql_data:/var/lib/mysql - env_file: .env memcached: image: memcached:1.6 container_name: $W9_ID-memcached restart: unless-stopped entrypoint: memcached -m 256 - env_file: .env - - elasticsearch: - image: seafileltd/elasticsearch-with-ik:5.6.16 - container_name: $W9_ID-elasticsearch - restart: unless-stopped - environment: - - discovery.type=single-node - - bootstrap.memory_lock=true - - "ES_JAVA_OPTS=-Xms1g -Xmx1g" - ulimits: - memlock: - soft: -1 - hard: -1 - deploy: - resources: - limits: - memory: 2G - volumes: - - elasticsearch_data:/usr/share/elasticsearch/data # Requested, specifies the path to Elasticsearch data persistent store. - profiles: - - pro - env_file: .env - - seafile-pro: - image: docker.seafile.top/seafileltd/seafile-pro-mc:$W9_VERSION - container_name: $W9_ID - restart: unless-stopped - ports: - - "$W9_HTTP_PORT_SET:$W9_HTTP_PORT" - # - "443:443" # If https is enabled, cancel the comment. - volumes: - - seafile_data:/shared # Requested, specifies the path to Seafile data persistent store. - env_file: .env - environment: - - DB_HOST=$W9_ID-mariadb - - DB_ROOT_PASSWD=$W9_POWER_PASSWORD - - TIME_ZONE=$W9_TIME_ZONE - - SEAFILE_ADMIN_EMAIL=$W9_LOGIN_USER - - SEAFILE_ADMIN_PASSWORD=$W9_LOGIN_PASSWORD - - SEAFILE_SERVER_LETSENCRYPT=false - - SEAFILE_SERVER_HOSTNAME=$W9_URL - depends_on: - - db - - memcached - - elasticsearch - profiles: - - pro seafile-ce: image: $W9_REPO:$W9_VERSION @@ -84,7 +35,7 @@ services: - SEAFILE_SERVER_LETSENCRYPT=false - SEAFILE_SERVER_HOSTNAME=$W9_URL depends_on: - - db + - mariadb - memcached networks: