Example (and test) service files added.

master
Luka Vandervelden 2019-07-08 02:59:01 +02:00
parent 5dd27e1101
commit 2e57922ffd
3 changed files with 53 additions and 0 deletions

24
services/authd.yaml Normal file
View File

@ -0,0 +1,24 @@
name: authd
environment-variables:
- LD_LIBRARY_PATH=/usr/local/lib
user: authd
command: >-
/home/lukc/Sources/authd/bin/authd
-K /srv/%{ENVIRONMENT}/jwt_key
-u /srv/%{ENVIRONMENT}/passwd
-g /srv/%{ENVIRONMENT}/group
checks:
- name: Creating IPC directory
directory: /run/ipc
command: install -d -m6777 /run/ipc
- name: Creating JWT key
file: /srv/%{ENVIRONMENT}/jwt_key
command: head -c 64 /dev/urandom | base64 > /srv/%{ENVIRONMENT}/jwt_key
- name: passwd file
file: /srv/%{ENVIRONMENT}/passwd
command: touch /srv/%{ENVIRONMENT}/passwd
- name: group file
file: /srv/%{ENVIRONMENT}/group
command: touch /srv/%{ENVIRONMENT}/group
provides:
- token: auth

11
services/kanband.yaml Normal file
View File

@ -0,0 +1,11 @@
name: kanband
command: kanband -k /srv/%{ENVIRONMENT}/jwt_key -S /srv/%{ENVIRONMENT}/kanban
user: kanban
environment-variables:
- LD_LIBRARY_PATH=/usr/local/lib
consumes:
- token: auth
checks:
- name: storage directory creation
directory: /srv/%{ENVIRONMENT}/kanban
command: mkdir -p /srv/%{ENVIRONMENT}/kanban && chown kanban:kanban /srv/%{ENVIRONMENT}/kanban

18
services/postgresql.yaml Normal file
View File

@ -0,0 +1,18 @@
name: postgresql
user: postgres
command: /usr/bin/postgres -D /srv/%{ENVIRONMENT}/postgresql -k /tmp/postgresql-%{ENVIRONMENT}
#stop-command: kill -HUP %{PID}
environment-variables:
- PGROOT=/srv/%{ENVIRONMENT}/postgresql
checks:
- name: database directory creation
directory: /srv/%{ENVIRONMENT}/postgresql
command: mkdir -p /srv/%{ENVIRONMENT}/postgresql && chown postgres:postgres /srv/%{ENVIRONMENT}/postgresql
- name: database creation
file: /srv/%{ENVIRONMENT}/postgresql/base
command: su - postgres -c "initdb --locale en_US.UTF-8 -D '/srv/%{ENVIRONMENT}/postgresql'"
- name: sockets directory
directory: /tmp/postgres-%{ENVIRONMENT}
# FIXME: impose permissions
command: mkdir -p /tmp/postgresql-%{ENVIRONMENT} && chown postgres:postgres /tmp/postgresql-%{ENVIRONMENT}
# FIXME: add postgresql-check-db-dir around here