25 lines
902 B
Plaintext
25 lines
902 B
Plaintext
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
|
|
provides: postgres
|
|
|
|
%check
|
|
name: database directory creation
|
|
directory: /srv/${ENVIRONMENT}/postgresql
|
|
command: mkdir -p /srv/${ENVIRONMENT}/postgresql && chown postgres:postgres /srv/${ENVIRONMENT}/postgresql
|
|
|
|
%check
|
|
name: database creation
|
|
file: /srv/${ENVIRONMENT}/postgresql/base
|
|
command: su - postgres -c "initdb --locale en_US.UTF-8 -D '/srv/${ENVIRONMENT}/postgresql'"
|
|
|
|
%check
|
|
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
|