Restructure top-level directory for a better understanding

pull/45/head
Philipp Holzer 2018-12-29 20:46:29 +01:00
rodzic 051a8b0357
commit 19a99bd270
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 517BE60E2CE5C8A5
8 zmienionych plików z 31 dodań i 38 usunięć

Wyświetl plik

@ -0,0 +1,23 @@
# Docker Files
This files are directly load to the docker image's root directory.
Any files except `*.sh` and `*.exclude` will get ignored during the repository upgrade.
## `entrypoint.sh`
This file is the default entrypoint of each start of Friendica.
It automatically checks the following things:
- If the image is for a develop or Release candidate, checkout the latest sources from github if necessary
- Setup the SMTP settings for SSMTP
- Check if an upgrade is necessary (due to new checkout or because of a new version)
- Check if it's a fresh installation and initialize Friendica
- Check if auto install is set and execute the auto-installer
- Read all environment variables and combine them with `local.config.php`
## `cron.sh`
This file is for overwriting the default entrypoint.
It starts the daemon of the current Friendica instance.
**Warning** Currently only **one** daemon service is allowed to run!
## `upgrade.exclude`
Contains all files to exclude during an upgrade or a fresh installation of Friendica (f.e. `local.config.php`)

2
.gitattributes vendored
Wyświetl plik

@ -1,2 +0,0 @@
# Disable LF normalization for all files
* -text

20
.gitignore vendored
Wyświetl plik

@ -1,20 +0,0 @@
favicon.*
\#*
*.log
*.out
*.version*
favicon.*
*~
robots.txt
#ignore config files from eclipse, we don't want IDE files in our repository
.project
.buildpath
.externalToolBuilders
.settings
#ignore OSX .DS_Store files
.DS_Store
#ignore config files from JetBrains
/.idea

Wyświetl plik

@ -10,16 +10,6 @@ Never ever change a file/folder inside a directory without a `.` at the beginnin
This folder will get updated automatically based on the templates you want to change.
All changes in such folders will get overwritten during an update.
# Basic files and folders
Most of the time you want to change one of the followed files.
## Templates & shell-scripts
- If you want to update/upgrade Dockerfiles, use the right `*.template` file for it.
- If you want to update/change the behavior of **every** start of Docker-image, change `docker-entrypoint.sh`
- If you want to update/change the behavior how cronjobs will get started, change `docker-cron.sh`
# Maintenance scripts
There are two important scripts in this repository for maintenance.

Wyświetl plik

@ -80,14 +80,16 @@ function create_variant() {
s/%%REDIS_VERSION%%/'"${pecl_versions[redis]}"'/g;
' "$dir/Dockerfile"
# Copy the shell scripts
for name in entrypoint cron; do
cp "docker-$name.sh" "$dir/$name.sh"
# Copy the .docker-files to the directories (excluding README.md)
for name in ".docker-files"/*; do
# Don't copy the README of any directory
if [[ "$name" == *.sh || "$name" == *.exclude ]]; then
file=${name#".docker-files"}
mkdir -p $(dirname $dir/$file)
cp -r "$name" "$dir/$file"
fi
done
# Copy the upgrade.exclude
cp upgrade.exclude "$dir/"
travisEnvAmd64='\n - env: VERSION='"$1"' VARIANT='"$variant"' ARCH=amd64'"$travisEnvAmd64"
for arch in i386 amd64; do
travisEnv='\n - env: VERSION='"$1"' VARIANT='"$variant"' ARCH='"$arch$travisEnv"