67 lines
1.9 KiB
Plaintext
67 lines
1.9 KiB
Plaintext
|
version: '3.6'
|
||
|
|
||
|
networks:
|
||
|
{% if open_asfa_behind_haproxy %}
|
||
|
haproxy-public:
|
||
|
external: true
|
||
|
{% endif %}
|
||
|
{{ open_asfa_docker_network }}:
|
||
|
|
||
|
volumes:
|
||
|
{{ open_asfa_db_volume }}:
|
||
|
{{ open_asfa_pgadmin_data_vol }}:
|
||
|
|
||
|
services:
|
||
|
pg:
|
||
|
image: {{ open_asfa_db_image }}
|
||
|
networks:
|
||
|
- {{ open_asfa_docker_network }}
|
||
|
volumes:
|
||
|
- {{ open_asfa_db_volume }}:/var/lib/postgresql/data/pg_data
|
||
|
- {{ open_asfa_compose_dir }}/pg-create-user-db.sh:/docker-entrypoint-initdb.d/pg-create-user-db.sh:ro
|
||
|
environment:
|
||
|
POSTGRES_PASSWORD: {{ open_asfa_db_pwd }}
|
||
|
POSTGRES_DB: postgres
|
||
|
POSTGRES_USER: postgres
|
||
|
POSTGRES_PORT: {{ open_asfa_db_port }}
|
||
|
PGDATA: /var/lib/postgresql/data/pg_data
|
||
|
deploy:
|
||
|
placement:
|
||
|
constraints: {{ open_asfa_db_constraints }}
|
||
|
restart_policy:
|
||
|
condition: on-failure
|
||
|
delay: 5s
|
||
|
max_attempts: 3
|
||
|
window: 120s
|
||
|
logging:
|
||
|
driver: 'journald'
|
||
|
pgadmin:
|
||
|
image: {{ open_asfa_pgadmin_image }}
|
||
|
networks:
|
||
|
- {{ open_asfa_docker_network }}
|
||
|
{% if open_asfa_behind_haproxy %}
|
||
|
- haproxy-public
|
||
|
{% endif %}
|
||
|
volumes:
|
||
|
- {{ open_asfa_pgadmin_data_vol }}:/var/lib/pgadmin
|
||
|
- {{ open_asfa_compose_dir }}/pgadmin_config_local.py:/pgadmin4/config_local.py:ro
|
||
|
- {{ open_asfa_compose_dir }}/pgadmin_servers.json:/pgadmin4/servers.json:ro
|
||
|
environment:
|
||
|
PGADMIN_DEFAULT_EMAIL: {{ open_asfa_pgadmin_email }}
|
||
|
PGADMIN_DEFAULT_PASSWORD: {{ open_asfa_pgadmin_default_pwd }}
|
||
|
PGADMIN_DISABLE_POSTFIX: disable
|
||
|
#PGADMIN_ENABLE_TLS: enable
|
||
|
PGADMIN_LISTEN_ADDRESS: 0.0.0.0
|
||
|
PGADMIN_LISTEN_PORT: 5050
|
||
|
GUNICORN_THREADS: 20
|
||
|
deploy:
|
||
|
placement:
|
||
|
constraints: {{ open_asfa_pgadmin_constraints }}
|
||
|
restart_policy:
|
||
|
condition: on-failure
|
||
|
delay: 5s
|
||
|
max_attempts: 3
|
||
|
window: 120s
|
||
|
logging:
|
||
|
driver: 'journald'
|