Volodymyr Stoiko | e5ab603 | 2017-04-22 17:41:29 +0300 | [diff] [blame] | 1 | parameters: |
| 2 | _param: |
| 3 | docker_postgresql_replicas: 1 |
Volodymyr Stoiko | 1ae92ce | 2017-08-11 11:45:12 +0300 | [diff] [blame] | 4 | postgresql_bind_host: postgresql-db |
Stanislav Riazanov | aeec70f | 2018-12-11 17:14:45 +0400 | [diff] [blame] | 5 | postgresql_bind_port: 5432 |
| 6 | postgresql_exposed_port: 5432 |
Volodymyr Stoiko | 1ae92ce | 2017-08-11 11:45:12 +0300 | [diff] [blame] | 7 | postgresql_ssl: |
| 8 | enabled: false |
Volodymyr Stoiko | e5ab603 | 2017-04-22 17:41:29 +0300 | [diff] [blame] | 9 | postgresql_admin_user: postgres |
Volodymyr Stoiko | e5ab603 | 2017-04-22 17:41:29 +0300 | [diff] [blame] | 10 | docker: |
| 11 | client: |
Ivan Berezovskiy | 679709c | 2019-06-27 15:44:34 +0400 | [diff] [blame] | 12 | images: |
| 13 | - ${_param:docker_image_postgresql} |
Volodymyr Stoiko | e5ab603 | 2017-04-22 17:41:29 +0300 | [diff] [blame] | 14 | stack: |
| 15 | postgresql: |
| 16 | environment: |
| 17 | POSTGRES_USER: ${_param:postgresql_admin_user} |
| 18 | POSTGRES_PASSWORD: ${_param:postgresql_admin_user_password} |
Stanislav Riazanov | aeec70f | 2018-12-11 17:14:45 +0400 | [diff] [blame] | 19 | PGDATA: /var/lib/postgresql/data/pgdata |
Volodymyr Stoiko | e5ab603 | 2017-04-22 17:41:29 +0300 | [diff] [blame] | 20 | service: |
Volodymyr Stoiko | 1ae92ce | 2017-08-11 11:45:12 +0300 | [diff] [blame] | 21 | postgresql-db: |
Volodymyr Stoiko | e5ab603 | 2017-04-22 17:41:29 +0300 | [diff] [blame] | 22 | image: ${_param:docker_image_postgresql} |
| 23 | deploy: |
| 24 | replicas: ${_param:docker_postgresql_replicas} |
| 25 | restart_policy: |
| 26 | condition: any |
Volodymyr Stoiko | e5ab603 | 2017-04-22 17:41:29 +0300 | [diff] [blame] | 27 | volumes: |
| 28 | - /srv/volumes/postgresql/data:/var/lib/postgresql/data |
Martin Polreich | 6b18957 | 2019-07-17 15:05:22 +0200 | [diff] [blame] | 29 | - /var/run/postgresql:/var/run/postgresql |
Volodymyr Stoiko | 1ae92ce | 2017-08-11 11:45:12 +0300 | [diff] [blame] | 30 | ports: |
Stanislav Riazanov | aeec70f | 2018-12-11 17:14:45 +0400 | [diff] [blame] | 31 | - ${_param:postgresql_exposed_port}:${_param:postgresql_bind_port} |