1.4 KiB
1.4 KiB
Containered Server
Private server based on containers and compose
Repo Structure
./services
Service definitions
One subfolder per service with:docker-compose.yml
for this service and its direct dependencies (e.g. db)- Additional config files, possibly as template (see below)
./setup
Host setup
Setup information about a possible alpine host system./tasks
Task definitionscommon.yml
: Base tasks used by other taskscompose.yml
: Container related tasks e.g. starting, updating, or reading logshot.yml
: Tasks related to host system maintenanceservices.yml
: Tasks for specific services
Requirements
envsubst
, most likely via gettext package. Refer to your distros docs.- docker
- docker-compose
Data Persistence
All data SHALL BE stored in $BASE_DIR
(defaults to /srv
), one subfolder per service.
Secrets & Configuration
Copy from .env.sample
and fill in your values.
Deploy
./task pod:up
List other tasks
./task -l
Templating
Filename pattern: *.template.*
Files matching the pattern are copied with the ".template." infix removed (e.g. forgejo.template.ini -> forgejo.ini).
Variables are replaced using shell substitution syntax (${VARIABLE_NAME_HERE}
) using the current environment and values from .env
.
Host Setup
A possible alpine based host setup is described in alpine-setup.