Skip to content

Commit

Permalink
seafile
Browse files Browse the repository at this point in the history
  • Loading branch information
qiaofeng1227 committed Dec 29, 2023
1 parent e5e0431 commit a77516b
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 70 deletions.
10 changes: 4 additions & 6 deletions apps/scratch/.env
Original file line number Diff line number Diff line change
@@ -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
#### --------------------------------------------------------------------------------------- ####
2 changes: 1 addition & 1 deletion apps/scratch/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 0 additions & 1 deletion apps/scratch/src/after_up.sh

This file was deleted.

3 changes: 0 additions & 3 deletions apps/scratch/src/filelist

This file was deleted.

2 changes: 1 addition & 1 deletion apps/scratch/variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{
"dist": "community",
"version": [
"v2.3.13",
"v3.0",
"latest"
]
}
Expand Down
12 changes: 6 additions & 6 deletions apps/seafile/.env
Original file line number Diff line number Diff line change
@@ -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=[email protected]
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
#### --------------------------------------------------------------------------------------- ####
69 changes: 69 additions & 0 deletions apps/seafile/docker-compose-pro.yml
Original file line number Diff line number Diff line change
@@ -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:
55 changes: 3 additions & 52 deletions apps/seafile/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,69 +1,20 @@
version: "3.8"
services:
db:
image: mariadb:10.5
mariadb:
image: mariadb:$W9_DB_VERSION
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
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
Expand All @@ -84,7 +35,7 @@ services:
- SEAFILE_SERVER_LETSENCRYPT=false
- SEAFILE_SERVER_HOSTNAME=$W9_URL
depends_on:
- db
- mariadb
- memcached

networks:
Expand Down

0 comments on commit a77516b

Please sign in to comment.