+ remove unecessary DB configs
+ add readme
+ rename templates
This commit is contained in:
Carsten Sprung 2019-12-07 23:40:51 +01:00
parent 63f146ee82
commit 45cdb03520
11 changed files with 65 additions and 23 deletions

56
README.md Normal file
View file

@ -0,0 +1,56 @@
# core docker server
## data persistence
All data is stored in `/srv`, one subfolder per service.
## secrets
submodule in `./secrets` or replace `./.env`
used variables:
```ini
BASE_DOMAIN=
CERTS_DIR=/srv/proxy/certs/acme/acme-v02.api.letsencrypt.org/sites
CADDY_TLS_EMAIL=
CADDY_DEV_PASS=
GITEA_PG_PWD=
GITEA_LFS_JWT_SECTRET=
GITEA_SECRET_KEY=
GITEA_INTERNAL_TOKEN=
GITEA_JWT_SECRET=
GITEA_MAIL_FROM=gitea
DRONE_PG_PWD=
DRONE_ADMIN=
DRONE_GITEA_CLIENT_ID=
DRONE_GITEA_CLIENT_SECRET=
DRONE_RPC_SECRET=
NEXTCLOUD_PG_PWD=
MATRIX_PG_PWD=
MATRIX_REGISTRATION_SECRET=
MATRIX_MAROON_SECRET=
MATRIX_FORM_SECRET=
MATRIX_MAIL_FROM=matrix
```
## templating
```bash
./template.sh
```
## deploy
```bash
source .aliases
dc-all up -d
```
:warning: alias does only work in `zsh`! For other shells use `docker-compose -f docker-compose.yml -f {subfolder1}/docker-compose.yml -f {subfolder2}/docker-compose.yml -f ... up -d`

View file

@ -24,7 +24,7 @@ services:
- DRONE_GIT_ALWAYS_AUTH=true - DRONE_GIT_ALWAYS_AUTH=true
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET} - DRONE_RPC_SECRET=${DRONE_RPC_SECRET}
- DRONE_DATABASE_DRIVER=postgres - DRONE_DATABASE_DRIVER=postgres
- DRONE_DATABASE_DATASOURCE=postgres://${DRONE_PG_USER:-drone}:${DRONE_PG_PWD:-drone}@pg-drone:5432/postgres?sslmode=disable - DRONE_DATABASE_DATASOURCE=postgres://drone:${DRONE_PG_PWD:-drone}@pg-drone:5432/drone?sslmode=disable
volumes: volumes:
- /srv/drone/data:/data - /srv/drone/data:/data
depends_on: depends_on:
@ -39,7 +39,7 @@ services:
restart: "${RESTART:-no}" restart: "${RESTART:-no}"
environment: environment:
- POSTGRES_DB=drone - POSTGRES_DB=drone
- POSTGRES_USER=${DRONE_PG_USER:-drone} - POSTGRES_USER=drone
- POSTGRES_PASSWORD=${DRONE_PG_PWD:-drone} - POSTGRES_PASSWORD=${DRONE_PG_PWD:-drone}
volumes: volumes:
- /srv/drone/psql:/var/lib/postgresql/data - /srv/drone/psql:/var/lib/postgresql/data

View file

@ -26,7 +26,6 @@ LFS_JWT_SECRET = ${GITEA_LFS_JWT_SECTRET}
OFFLINE_MODE = false OFFLINE_MODE = false
[database] [database]
PATH = /data/gitea/gitea.db
DB_TYPE = postgres DB_TYPE = postgres
HOST = pg-gitea:5432 HOST = pg-gitea:5432
NAME = gitea NAME = gitea

View file

@ -14,12 +14,6 @@ services:
domainname: ${BASE_DOMAIN} domainname: ${BASE_DOMAIN}
ports: ports:
- '222:22' - '222:22'
environment:
- DB_TYPE=postgres
- DB_HOST=pg-gitea:5432
- DB_NAME=gitea
- DB_USER=gitea
- DB_PASSWD=${GITEA_PG_PWD:-gitea}
volumes: volumes:
- /srv/gitea/data:/data - /srv/gitea/data:/data
- ./gitea/app.ini:/data/gitea/conf/app.ini - ./gitea/app.ini:/data/gitea/conf/app.ini

View file

@ -130,8 +130,8 @@ email:
enable_notifs: false enable_notifs: false
smtp_host: 'mail' smtp_host: 'mail'
smtp_port: 25 # SSL: 465, STARTTLS: 587 smtp_port: 25 # SSL: 465, STARTTLS: 587
smtp_user: '${MATRIX_MAIL_USER}@${BASE_DOMAIN}' # smtp_user: '${MATRIX_MAIL_USER}@${BASE_DOMAIN}'
smtp_pass: '${MATRIX_MAIL_PASS}' # smtp_pass: '${MATRIX_MAIL_PASS}'
require_transport_security: false require_transport_security: false
notif_from: 'Your Friendly %(app)s Home Server <${MATRIX_MAIL_FROM}@${BASE_DOMAIN}>' notif_from: 'Your Friendly %(app)s Home Server <${MATRIX_MAIL_FROM}@${BASE_DOMAIN}>'
app_name: Matrix app_name: Matrix

View file

@ -19,16 +19,9 @@ services:
domainname: ${BASE_DOMAIN} domainname: ${BASE_DOMAIN}
environment: environment:
- SYNAPSE_CONFIG_DIR=/config - SYNAPSE_CONFIG_DIR=/config
# - SYNAPSE_CONFIG_PATH=/etc/homeserver.yaml
- TZ=DE - TZ=DE
- UID=0 - UID=0
- GID=0 - GID=0
# - DB_TYPE=postgres
# - DB_HOST=pg-matrix:5432
# - DB_NAME=matrix
# - DB_USER=${MATRIX_PG_USER:-matrix}
# - DB_PASSWD=${MATRIX_PG_PWD:-matrix}
volumes: volumes:
- ./matrix/config:/config:ro - ./matrix/config:/config:ro
- /srv/matrix/data:/data - /srv/matrix/data:/data

View file

@ -15,7 +15,7 @@ services:
environment: environment:
- POSTGRES_HOST=pg-nextcloud - POSTGRES_HOST=pg-nextcloud
- POSTGRES_DB=nextcloud - POSTGRES_DB=nextcloud
- POSTGRES_USER=${NEXTCLOUD_PG_USER:-nextcloud} - POSTGRES_USER=nextcloud
- POSTGRES_PASSWORD=${NEXTCLOUD_PG_PWD:-password} - POSTGRES_PASSWORD=${NEXTCLOUD_PG_PWD:-password}
volumes: volumes:
- /srv/nextcloud/html:/var/www/html # Main folder, needed for updating - /srv/nextcloud/html:/var/www/html # Main folder, needed for updating
@ -36,7 +36,7 @@ services:
restart: "${RESTART:-no}" restart: "${RESTART:-no}"
environment: environment:
- POSTGRES_DB=nextcloud - POSTGRES_DB=nextcloud
- POSTGRES_USER=${NEXTCLOUD_PG_USER:-nextcloud} - POSTGRES_USER=nextcloud
- POSTGRES_PASSWORD=${NEXTCLOUD_PG_PWD:-password} - POSTGRES_PASSWORD=${NEXTCLOUD_PG_PWD:-password}
volumes: volumes:
- /srv/nextcloud/psql:/var/lib/postgresql/data - /srv/nextcloud/psql:/var/lib/postgresql/data

@ -1 +1 @@
Subproject commit 2d4bbcd1a3a53c8e1a13a6ad10412c8546e352b0 Subproject commit ac1530a8c6bac903e3d6f4d83e9676ffdd091254

View file

@ -5,8 +5,8 @@ set -a
. .env . .env
set +a set +a
find . -name "*.template" | while read -r f find . -name "*.template.*" | while read -r f
do do
echo "== Processing $f" echo "== Processing $f"
envsubst < $f > ${f%.template} envsubst < $f > ${f/.template/}
done done