diff --git a/services/authd.yaml b/services/authd.yaml new file mode 100644 index 0000000..877c503 --- /dev/null +++ b/services/authd.yaml @@ -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 diff --git a/services/kanband.yaml b/services/kanband.yaml new file mode 100644 index 0000000..ead7565 --- /dev/null +++ b/services/kanband.yaml @@ -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 diff --git a/services/postgresql.yaml b/services/postgresql.yaml new file mode 100644 index 0000000..f005db4 --- /dev/null +++ b/services/postgresql.yaml @@ -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