Skip to content

Commit 9b011a5

Browse files
zorg Code v4.8.0
Merge pull request #71 from zorgch/develop
2 parents 07bc750 + bf8f73c commit 9b011a5

76 files changed

Lines changed: 3938 additions & 3517 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
end_of_line = lf
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
max_line_length = 86
12+
13+
# Matches multiple files with brace expansion notation
14+
# Set default charset
15+
[*.{php,tpl,js,css,xml,py,json,md}]
16+
charset = utf-8
17+
18+
# 4 space indentation
19+
[*.{py,md}]
20+
indent_style = space
21+
indent_size = 4
22+
23+
# Tab indentation for everything else
24+
[*.{php,tpl,js,css,xml,json}]
25+
indent_style = tab
26+
indent_size = 4

.env.example

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -77,31 +77,32 @@ USERIMAGE_EXTENSION=".jpg" # Extension with .-prefix
7777
USERIMAGE_SIZE_LARGE=
7878
USERIMAGE_SIZE_SMALL=
7979
USERIMAGE_DEFAULT="none${USERIMAGE_EXTENSION}" # Must be within USERIMAGES_DIR
80-
ADDLE_MAX_GAMES=
81-
ADDLE_BASE_POINTS=
82-
ADDLE_MAX_POINTS_TRANSFERABLE=
83-
APOD_GALLERY_ID= # Match to gallery_albums-Table `id`
80+
ADDLE_MAX_GAMES=1
81+
ADDLE_BASE_POINTS=1600
82+
ADDLE_MAX_POINTS_TRANSFERABLE=32
8483
BUGTRACKER_FILTER_DEFAULT="?show[]=open&show[]=notdenied&show[]=assigned&show[]=unassigned"
85-
CHESS_DWZ_BASE_POINTS=
86-
CHESS_DWZ_MAX_POINTS_TRANSFERABLE=
87-
FORUM_DEFAULT_MAXDEPTH=
88-
FORUM_THREAD_CLEARCACHE_AFTER= # In Tagen
89-
GALLERY_MAX_PIC_SIZE="['width'=>800, 'height'=>800]"
90-
GALLERY_MAX_THUMBNAIL_SIZE="['width'=>150, 'height'=>150]"
91-
GALLERY_THUMBPAGE="['width'=>4, 'height'=>3, 'padding'=>10]"
92-
GO_OFFSET_PIC=
93-
GO_LINKRADIUS=
94-
GO_FIELDSIZE=
95-
GO_LINEWIDTH=
96-
GO_STARDOTWIDTH=
97-
GO_STONEBIGWIDTH=
98-
GO_LASTSTONEWIDTH=
84+
CHESS_DWZ_BASE_POINTS=1600
85+
CHESS_DWZ_MAX_POINTS_TRANSFERABLE=32
86+
FORUM_DEFAULT_MAXDEPTH=10
87+
FORUM_THREAD_CLEARCACHE_AFTER=30 # In Tagen
88+
GALLERY_MAX_PIC_WIDTH=800 # In Pixel
89+
GALLERY_MAX_PIC_HEIGHT=600 # In Pixel
90+
GALLERY_MAX_THUMB_WIDTH=150 # In Pixel
91+
GALLERY_MAX_THUMB_HEIGHT=150 # In Pixel
92+
APOD_GALLERY_ID= # Match to gallery_albums-Table `id`
93+
GO_OFFSET_PIC=250 # In Pixel
94+
GO_LINKRADIUS=15 # In Pixel
95+
GO_FIELDSIZE=40 # In Pixel
96+
GO_LINEWIDTH=2 # In Pixel
97+
GO_STARDOTWIDTH=10 # In Pixel
98+
GO_STONEBIGWIDTH=190 # In Pixel
99+
GO_LASTSTONEWIDTH=10 # In Pixel
99100
URLPATH_HZ_IMAGES="${URLPATH_IMAGES}hz/"
100101
HZ_MAPS_EXTENSION=".gif"
101-
HZ_MAX_GAMES=
102-
HZ_TURN_TIME= # In Sekunden: 3 Tage
103-
HZ_TURN_COUNT=
104-
HZ_TURN_ADD_MONEY=
102+
HZ_MAX_GAMES=5
103+
HZ_TURN_TIME=259200 # In Sekunden: 3 Tage
104+
HZ_TURN_COUNT=4
105+
HZ_TURN_ADD_MONEY=10
105106
SETI_TEAM_NAME=""
106107
SETI_EMAIL=""
107108
STRING_NOT_FOUND="Reference not found in String list"
@@ -124,8 +125,8 @@ COOKIE_USERPW="autologin_pw"
124125
SMARTY_CACHE="${APP_ROOT}/data/smartylib/cache/"
125126
SMARTY_COMPILE="${APP_ROOT}/data/smartylib/templates_c/"
126127
SMARTY_DIR="${WWW_ROOT}/smartylib/"
127-
SMARTY_TRUSTED_DIRS="${WWW_ROOT}/scripts/" # (array) with strings
128-
SMARTY_TEMPLATES_HTML="${VIEWS_DIR}" # (array) with strings
128+
SMARTY_TRUSTED_DIRS="${WWW_ROOT}/scripts/" # Comma-separated list of paths
129+
SMARTY_TEMPLATES_HTML="${VIEWS_DIR}" # Comma-separated list of paths
129130
SMARTY_PACKAGES_DIR="${WWW_ROOT}/packages/"
130131
SMARTY_PACKAGES_EXTENSION=".php"
131132
SMARTY_DEFAULT_TPL_ID=
@@ -166,12 +167,12 @@ TELEGRAM_BOT="" # as registered with @BotFather
166167
TELEGRAM_BOT_API_KEY="" # as provided by @BotFather
167168
TELEGRAM_BOT_API="https://api.telegram.org/bot${TELEGRAM_BOT_API_KEY}/"
168169
TELEGRAM_BOT_API_AUTH_PASSWORD="" # (string) A secret password required to authorise access to the webhook
169-
TELEGRAM_BOT_API_IPWHITELIST="[]" # (array) When using `validate_request`, like: [ '1.2.3.4', '1.1.1.1-2.2.2.2']
170-
TELEGRAM_BOT_API_USERWHITELIST="[]" # (array) An array of Telegram UserIDs that have admin access to your bot (must be integers)
171-
TELEGRAM_BOT_API_SSLCERT_PATH="" # (string) Path to a self-signed certificate (if necessary), like: "/server.crt"
170+
TELEGRAM_BOT_API_IPWHITELIST="" # (comma separated list) When using `validate_request`, like: 1.2.3.4,1.1.1.1-2.2.2.2
171+
TELEGRAM_BOT_API_USERWHITELIST="" # (comma separated list) A list of Telegram UserIDs that have admin access to your bot
172+
TELEGRAM_BOT_API_SSLCERT_PATH="" # (string) Path to a self-signed certificate (if necessary), like: /server.crt
172173
TELEGRAM_BOT_API_CHAT="" # (integer) Chat-ID where the Telegram Bot will post to
173-
TELEGRAM_BOT_API_FILES_DIR="" # (array) List of configurable paths.
174-
TELEGRAM_BOT_API_LOG_DIR="${ERRORLOG_DIR}" # (array) Paths where the log files should be put.
174+
TELEGRAM_BOT_API_FILES_DIR="" # Comma-separated list of paths.
175+
TELEGRAM_BOT_API_LOG_DIR="${ERRORLOG_DIR}" # (string) Path to where the log files should be put.
175176
# - Twitter API
176177
TWITTER_API_KEY=""
177178
TWITTER_API_SECRET=""
@@ -198,3 +199,6 @@ ZORG_VEREIN_KONTO_IBAN="CH7500781622431172000"
198199
ZORG_VEREIN_KONTO_IBAN_QRBILL="CH9730781622431172000"
199200
ZORG_VEREIN_KONTO_CURRENCY="CHF"
200201
ZORG_VEREIN_KONTO_BESRID=""
202+
203+
# Local Development and Debugging settings:
204+
DEBUG_SCOPE="" # (Optional) A File or Function name to debug

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*.log
77
/vendor
88
.env
9+
*.code-workspace
910

1011
# ...and DON'T ignore these things
1112
!.github/
@@ -21,4 +22,3 @@
2122
!/keys
2223
!/migration
2324
!/scripts
24-
Docker/mysql57

Docker/.env.docker

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
# === Docker ===
22
COMPOSE_PROJECT_NAME="zorg"
33
OS_PLATFORM="linux/x86_64"
4-
HTTP_PORT="80"
5-
HTTPS_PORT="443"
4+
HTTP_PORT=80
5+
HTTPS_PORT=443
66
DOMAINNAME="zorg.local"
77
APACHE_USER="www-data"
88
APACHE_GROUP="www-data"
99
APACHE_WEBROOT="/var/www"
10-
PHP_Version="7.4"
10+
PHP_Version=7.4
1111
PHP_INI_DIR="/usr/local/etc/php"
12-
MYSQL_VERSION="5.7"
12+
XDEBUG_PORT=9003
13+
XDEBUG_MODES="develop,debug,profile"
14+
XDEBUG_LOGLEVEL=7
15+
MYSQL_VERSION=5.7
1316
MYSQL_LOCAL_DATABASE_PATH="./Docker/mysql57"
14-
MYSQL_PORT="3306"
17+
MYSQL_PORT=3306
1518
MYSQL_DATABASE="zooomclan"
1619
MYSQL_USER="root"
1720
MYSQL_PASSWORD=""
18-
PHPMYADMIN_PORT="8080"
21+
PHPMYADMIN_PORT=8080

Docker/.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
# Ignore changes within the Docker database volume
2-
mysql57
2+
/mysql57
3+
4+
# ...and DON'T ignore the DB template
5+
!/mysql57/zooomclan-empty

Docker/README.md

Lines changed: 79 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,50 +4,24 @@
44
## Docker configs
55
Edit the file: `.env.docker`
66

7-
### Using docker-sync
8-
`docker-sync` greatly improves the performance of synced volumes from the local file system to Docker, giving a nearly live-performance for read/write operations.
9-
107
#### Setup on macOS
118
(The following steps are copied from [this online documentation](https://reece.tech/posts/osx-docker-performance/))
9+
* **Recommendation**: use [OrbStack](https://orbstack.dev/) instead of Docker Desktop for Mac!
1210

13-
##### Install docker-sync
14-
15-
```
16-
gem install --user-install docker-sync
17-
brew install fswatch
18-
brew install unison
19-
brew install eugenmayer/dockersync/unox
20-
```
21-
22-
#### Configuring docker-sync
23-
Docker sync requires a valid configuration file (docker-sync.yaml), the below file creates a named volume for Docker called osx-sync and mounts the local macOS directory.
24-
25-
Add `docker-sync` to your $PATH using `nano ~/.zshrc`
26-
27-
```
28-
if which ruby >/dev/null && which gem >/dev/null; then
29-
PATH="$(ruby -r rubygems -e 'puts Gem.user_dir')/bin:$PATH"
30-
fi
31-
```
32-
33-
Now run `source ~/.zshrc` to apply the $PATH settings.
34-
35-
## Build the Docker container and docker-sync
11+
## Build the Docker container & start the services
3612
Start container with all services.
3713

3814
* in "detached mode" - without interative log in the Shell
3915

4016
```
4117
cd /path/to/zorg-code/
42-
docker-sync start -c ./Docker/docker-sync.yml
4318
docker compose --project-directory ./ --file ./Docker/docker-compose.yml --env-file ./Docker/.env.docker up -d
4419
```
4520

4621
* or with an interactive log in the Shell
4722

4823
```
4924
cd /path/to/zorg-code/
50-
docker-sync-stack start -c ./Docker/docker-sync.yml
5125
docker compose --project-directory ./ --file ./Docker/docker-compose.yml --env-file ./Docker/.env.docker up
5226
```
5327

@@ -122,6 +96,10 @@ Enter into interactive shell mode for a container service
12296

12397
`docker exec -it SERVICENAME sh`
12498

99+
List all Environment Variables for a container service
100+
101+
`docker exec SERVICENAME env`
102+
125103
### docker-sync inspection
126104
!! Refresh docker-sync after updating the `docker-compose.yml`-file
127105

@@ -135,3 +113,76 @@ Inspect running docker-sync services:
135113
Inspect the logfile for sendmail / msmtprc:
136114

137115
`docker exec -it zorg-web cat /var/log/sendmail.log`
116+
117+
118+
## Archive / Deprecated
119+
### Using docker-sync (not recommended!)
120+
`docker-sync` greatly improves the performance of synced volumes from the local file system to Docker, giving a nearly live-performance for read/write operations.
121+
122+
##### Install docker-sync
123+
124+
```
125+
gem install --user-install docker-sync
126+
brew install fswatch
127+
brew install unison
128+
brew install eugenmayer/dockersync/unox
129+
```
130+
131+
#### Configuring docker-sync
132+
Docker sync requires a valid configuration file (docker-sync.yaml), the below file creates a named volume for Docker called osx-sync and mounts the local macOS directory.
133+
134+
Add `docker-sync` to your $PATH using `nano ~/.zshrc`
135+
136+
```
137+
if which ruby >/dev/null && which gem >/dev/null; then
138+
PATH="$(ruby -r rubygems -e 'puts Gem.user_dir')/bin:$PATH"
139+
fi
140+
```
141+
142+
Now run `source ~/.zshrc` to apply the $PATH settings.
143+
144+
##### Add `docker-sync.yml` to `/Docker/` dir
145+
Here's an example `docker-sync` YAML configuration:
146+
147+
```yaml
148+
version: "2"
149+
options:
150+
config_path: './../'
151+
compose-file-path: './docker-compose.yml'
152+
verbose: true
153+
syncs:
154+
# sync_strategy: see https://docker-sync.readthedocs.io/en/latest/getting-started/configuration.html#sync-strategy
155+
zorg-web-root-git-sync:
156+
src: './.git'
157+
sync_strategy: 'unison'
158+
zorg-web-root-data-sync:
159+
src: './data'
160+
sync_strategy: 'unison'
161+
#sync_excludes: [ ]
162+
zorg-web-root-vendor-sync:
163+
src: './vendor'
164+
sync_strategy: 'unison'
165+
# sync_host_ip: 'auto'
166+
# sync_host_port: 10873
167+
sync_excludes: [ ]
168+
zorg-web-root-www-sync:
169+
src: './www'
170+
sync_strategy: 'unison'
171+
sync_excludes: [ ]
172+
zorg-db-mysql-sync:
173+
src: './Docker/mysql57'
174+
sync_strategy: 'unison'
175+
sync_excludes: [ ]
176+
177+
```
178+
179+
#### Build the Docker container with docker-sync
180+
Start container with all services.
181+
182+
* in "detached mode" - without interative log in the Shell
183+
184+
```
185+
cd /path/to/zorg-code/
186+
docker-sync start -c ./Docker/docker-sync.yml
187+
docker compose --project-directory ./ --file ./Docker/docker-compose.yml --env-file ./Docker/.env.docker up -d
188+
```

0 commit comments

Comments
 (0)