Skip to content

Commit

Permalink
new template
Browse files Browse the repository at this point in the history
  • Loading branch information
chendelin1982 authored Nov 17, 2023
1 parent 03e83f6 commit b7c4135
Show file tree
Hide file tree
Showing 15 changed files with 188 additions and 132 deletions.
46 changes: 35 additions & 11 deletions apps/owncloud/.env
Original file line number Diff line number Diff line change
@@ -1,18 +1,42 @@
APP_REPO=owncloud/server
APP_DIST=community
APP_VERSION=10.11

APP_ID=owncloud

#### -- Not allowed to edit below environments when recreate app based on existing data -- ####

POWER_PASSWORD=8dHZPFLFGoPXuC

APP_VERSION=10.11
APP_HTTP_PORT=9001
# Environments which for user settings when create application
APP_HTTP_PORT_SET=9001

APP_HTTP_PORT=8080
# Not need to add port for url
APP_URL=Internet_IP:$APP_HTTP_PORT_SET
APP_URL_REPLACE=true

APP_USER=admin
APP_PASSWORD=$POWER_PASSWORD
APP_NAME=owncloud

APP_DB_EXPOSE="mysql,redis"

#### ----------------------------------------------------------------------------------------- ####

APP_NETWORK=websoft9
APP_URL_REPLACE=true
APP_NAME=owncloud

# Not need to add port for url
APP_URL=appname.example.com

APP_DB_MYSQL_VERSION=5.7
APP_DB_MYSQL_PORT=3306
APP_DB_MYSQL_PASSWORD=$POWER_PASSWORD
APP_DB_MYSQL_NAME=$APP_NAME
APP_DB_MYSQL_USER=$APP_NAME
#----------------- OWNCLOUD environment if you need ---------------------#
OWNCLOUD_DOMAIN=$APP_URL
OWNCLOUD_TRUSTED_DOMAINS=$APP_URL
OWNCLOUD_DB_TYPE=mysql
OWNCLOUD_DB_NAME=$APP_ID
OWNCLOUD_DB_USERNAME=$APP_ID
OWNCLOUD_DB_PASSWORD=$POWER_PASSWORD
OWNCLOUD_DB_HOST=$APP_ID-mysql
OWNCLOUD_ADMIN_USERNAME=$APP_USER
OWNCLOUD_ADMIN_PASSWORD=$APP_PASSWORD
OWNCLOUD_MYSQL_UTF8MB4=true
OWNCLOUD_REDIS_ENABLED=true
OWNCLOUD_REDIS_HOST=$APP_ID-redis
43 changes: 13 additions & 30 deletions apps/owncloud/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,12 @@ version: '3.8'

services:
owncloud:
image: owncloud/server:${APP_VERSION}
container_name: ${APP_NAME}
image: $APP_REPO:$APP_VERSION
container_name: $APP_ID
ports:
- ${APP_HTTP_PORT}:8080
- $APP_HTTP_PORT_SET:8080
volumes:
- owncloud:/mnt/data
environment:
- OWNCLOUD_DOMAIN=${APP_URL}
- OWNCLOUD_TRUSTED_DOMAINS=${APP_URL}
- OWNCLOUD_DB_TYPE=mysql
- OWNCLOUD_DB_NAME=${APP_DB_MYSQL_NAME}
- OWNCLOUD_DB_USERNAME=${APP_DB_MYSQL_USER}
- OWNCLOUD_DB_PASSWORD=${APP_DB_MYSQL_PASSWORD}
- OWNCLOUD_DB_HOST=${APP_NAME}-db
- OWNCLOUD_ADMIN_USERNAME=${APP_USER}
- OWNCLOUD_ADMIN_PASSWORD=${APP_PASSWORD}
- OWNCLOUD_MYSQL_UTF8MB4=true
- OWNCLOUD_REDIS_ENABLED=true
- OWNCLOUD_REDIS_HOST=redis
env_file: .env
healthcheck:
test: ["CMD", "/usr/bin/healthcheck"]
Expand All @@ -34,17 +21,11 @@ services:
- mysql
- redis
restart: unless-stopped
stdin_open: true
tty: true

mysql:
image: mysql:${APP_DB_MYSQL_VERSION}
container_name: ${APP_NAME}-db
image: mysql:5.7
container_name: $APP_ID-mysql
restart: unless-stopped
stdin_open: true
tty: true
ports:
- ${APP_DB_MYSQL_PORT}:3306
command: ["--max-allowed-packet=128M", "--innodb-log-file-size=64M", "--character-set-server=utf8mb4", "--collation-server=utf8mb4_unicode_ci"]
volumes:
- mysql:/var/lib/mysql
Expand All @@ -53,15 +34,17 @@ services:
interval: 10s
timeout: 5s
retries: 5
env_file: .env
environment:
MYSQL_DATABASE: ${APP_DB_MYSQL_NAME}
MYSQL_USER: ${APP_DB_MYSQL_USER}
MYSQL_PASSWORD: ${APP_DB_MYSQL_PASSWORD}
MYSQL_ROOT_PASSWORD: ${APP_DB_MYSQL_PASSWORD}
MYSQL_DATABASE: $APP_ID
MYSQL_USER: $APP_ID
MYSQL_PASSWORD: $POWER_PASSWORD
MYSQL_ROOT_PASSWORD: $POWER_PASSWORD

redis:
image: redis:6
container_name: ${APP_NAME}-redis
env_file: .env
container_name: $APP_ID-redis
restart: unless-stopped
command: ["--databases", "1"]
healthcheck:
Expand All @@ -80,4 +63,4 @@ volumes:
networks:
default:
name: ${APP_NETWORK}
external: true
external: true
7 changes: 6 additions & 1 deletion apps/owncloud/variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
"trademark": "Owncloud",
"release": true,
"fork_url": "https://github.com/owncloud-docker/server",
"version": "10.11,latest",
"edition": [
{
"dist": "community",
"version": ["10.11","latest"]
}
],
"requirements": {
"cpu": "1",
"memory": "1",
Expand Down
33 changes: 27 additions & 6 deletions apps/pgadmin/.env
Original file line number Diff line number Diff line change
@@ -1,10 +1,31 @@
# default pgadmin user [email protected] ,passwd SuperSecret
POWER_PASSWORD=uQ8E1wVTzG8SOk3!
APP_REPO=dpage/pgadmin4
APP_DIST=community
APP_VERSION=latest
APP_HTTP_PORT=9090
APP_NAME=pgadmin

APP_ID=pgadmin

#### -- Not allowed to edit below environments when recreate app based on existing data -- ####

POWER_PASSWORD=uQ8E1wVTzG8SOk3!

# Environments which for user settings when create application
APP_HTTP_PORT_SET=9090

# APP_HTTP_PORT or APP_HTTPS_PORT is need at leaset and used for proxy for web application
APP_HTTP_PORT=80
APP_URL=internet_ip:$APP_HTTP_PORT_SET

# default pgadmin user [email protected] ,passwd SuperSecret if not set
APP_USER=[email protected]
APP_PASSWORD=$POWER_PASSWORD

#### ----------------------------------------------------------------------------------------- ####

APP_NETWORK=websoft9
APP_URL_REPLACE=false
APP_URL=appname.example.com
APP_NAME=pgadmin


#----------------- pgAdmin environment if you need ---------------------#
PGADMIN_DEFAULT_EMAIL=$APP_USER
PGADMIN_DEFAULT_PASSWORD=$APP_PASSWORD
PGADMIN_LISTEN_ADDRESS=0.0.0.0
11 changes: 4 additions & 7 deletions apps/pgadmin/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,13 @@
version: "3.8"
services:
pgadmin:
image: dpage/pgadmin4:${APP_VERSION}
image: $APP_REPO:$APP_VERSION
restart: unless-stopped
container_name: ${APP_NAME}
container_name: $APP_ID
ports:
- "${APP_HTTP_PORT}:80"
- "${APP_HTTP_PORT_SET}:80"
env_file: .env
environment:
- PGADMIN_DEFAULT_EMAIL=${APP_USER}
- PGADMIN_DEFAULT_PASSWORD=${APP_PASSWORD}
- PGADMIN_LISTEN_ADDRESS=0.0.0.0


postgres:
image: postgres
Expand Down
7 changes: 6 additions & 1 deletion apps/pgadmin/variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
"trademark": "pgAdmin",
"release": true,
"fork_url": "https://github.com/postgres/pgadmin4",
"version": "latest",
"edition": [
{
"dist": "community",
"version": ["latest"]
}
],
"requirements": {
"cpu": "1",
"memory": "1",
Expand Down
29 changes: 21 additions & 8 deletions apps/phpmyadmin/.env
Original file line number Diff line number Diff line change
@@ -1,18 +1,31 @@
# PMA_HOSTS for multi instances, e.g - PMA_HOSTS=172.17.0.1, 172.17.0.2
APP_REPO=phpmyadmin
APP_DIST=community
APP_VERSION=latest

APP_DB_MYSQL_PORT=3306
APP_ID=phpmyadmin

APP_VERSION=latest
APP_NAME=phpmyadmin
APP_HTTP_PORT=9090
APP_UPLOAD_LIMIT=1000M
APP_NETWORK=websoft9
#### -- Not allowed to edit below environments when recreate app based on existing data -- ####

# Environments which for user settings when create application
APP_HTTP_PORT_SET=9090

# APP_HTTP_PORT or APP_HTTPS_PORT is need at leaset and used for proxy for web application
APP_HTTP_PORT=80

# URL, Only useful for proxy. it must use root url if you don't need to use subdirectory
# subdirectory: http://phpmyadmin.example.com/phpmyadmin/
# root: http://appname.example.com
APP_URL=http://appname.example.com
APP_URL=internet_ip:$APP_HTTP_PORT_SET


#### ----------------------------------------------------------------------------------------- ####

APP_NETWORK=websoft9
APP_NAME=phpmyadmin

# PMA_HOSTS for multi instances, e.g - PMA_HOSTS=172.17.0.1, 172.17.0.2
PMA_ARBITRARY=1
PMA_HOST=mysql
PMA_PORT=3306
UPLOAD_LIMIT=1000M
PMA_ABSOLUTE_URI=$APP_URL
23 changes: 7 additions & 16 deletions apps/phpmyadmin/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,26 @@
version: "3.8"
services:
phpmyadmin:
image: phpmyadmin:$APP_VERSION
container_name: $APP_NAME
image: $APP_REPO:$APP_VERSION
container_name: $APP_ID
volumes:
- ./src/config.user.inc.php:/etc/phpmyadmin/config.user.inc.php
env_file: .env
environment:
- PMA_ABSOLUTE_URI=$APP_URL
- UPLOAD_LIMIT=$APP_UPLOAD_LIMIT
restart: unless-stopped
ports:
- ${APP_HTTP_PORT}:80
- $APP_HTTP_PORT_SET:80

db:
image: mariadb:10.3
container_name: $APP_NAME-db
container_name: $APP_ID-mariadb
restart: unless-stopped
volumes:
- type: volume
source: db
target: /var/lib/mysql
env_file: .env
environment:
MYSQL_ROOT_PASSWORD: notSecureChangeMe
profiles:
- db

networks:
default:
name: ${APP_NETWORK}
external: true

volumes:
db:
name: $APP_NETWORK
external: true
6 changes: 6 additions & 0 deletions apps/phpmyadmin/variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
"trademark": "phpMyAdmin",
"release": false,
"fork_url": "https://github.com/phpmyadmin/docker",
"edition": [
{
"dist": "community",
"version": ["latest"]
}
],
"version": "5.2.1",
"requirements": {
"cpu": "1",
Expand Down
33 changes: 24 additions & 9 deletions apps/wordpress/.env
Original file line number Diff line number Diff line change
@@ -1,22 +1,37 @@
POWER_PASSWORD=uQ8E1wVTzG8SOk3!

# version tags refer to: https://hub.docker.com/_/wordpress
APP_NETWORK=websoft9
APP_REPO=wordpress
APP_DIST=community
APP_VERSION=latest

APP_ID=wordpress
APP_HTTP_PORT=80
APP_NAME=wordpress
APP_DIST=community

#### -- Not allowed to edit below environments when recreate app based on existing data -- ####

POWER_PASSWORD=uQ8E1wVTzG8SOk3!

# Environments which for user settings when create application
APP_HTTP_PORT_SET=9001

APP_HTTP_PORT=80
#wordpress have write app_url to database
APP_URL=appname.example.com
APP_URL=Internet_IP:$APP_HTTP_PORT_SET
APP_URL_REPLACE=true
APP_ADMIN_PATH="/wp-admin"

DOMAIN=wordpress.example.com
EMAIL=[email protected]
APP_DB_EXPOSE="mysql"

#### ----------------------------------------------------------------------------------------- ####

APP_NETWORK=websoft9
APP_NAME=wordpress


# non-empty value will enable WP_DEBUG in wp-config.php
# WORDPRESS_DEBUG=1
WORDPRESS_CONFIG_EXTRA=" define('WP_ALLOW_MULTISITE', true ); \n"
WP_CLI_ALLOW_ROOT=1
PAGER=more
WORDPRESS_DB_HOST=$APP_ID-db
WORDPRESS_DB_USER=$APP_ID
WORDPRESS_DB_PASSWORD=$POWER_PASSWORD
WORDPRESS_DB_NAME=$APP_ID
Loading

0 comments on commit b7c4135

Please sign in to comment.