Advertisement
PhoenyxRLP

NC with PgSQL

Feb 22nd, 2022
1,068
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.84 KB | None | 0 0
  1. version: "3.5"
  2.  
  3. volumes:
  4.  #nextcloud:
  5.   data:
  6.   db:
  7.   pgadmin:
  8.  #nextcloud-app:
  9.  
  10. networks:
  11.   nginx_proxy_frontend:
  12.    # add this if the network is already existing!
  13.     external: true
  14.   nginx_proxy_backend:
  15.    # add this if the network is already existing!
  16.     external: true
  17.  
  18. services:
  19.   nextcloud-pgsql-app:
  20.     container_name: nc_pgsql_app
  21.     image: nextcloud:23
  22.     restart: always
  23.     volumes:
  24.      - data:/var/www/html/
  25.     healthcheck:
  26.       test: curl --fail http://localhost || exit 1
  27.       interval: 30s
  28.       retries: 5
  29.       timeout: 10s
  30.     environment:
  31.       POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
  32.       POSTGRES_DATABASE: ${POSTGRES_DATABASE:-nextcloud}
  33.       POSTGRES_USER: ${POSTGRES_USER:-nextcloud}
  34.       POSTGRES_HOST: ${POSTGRES_HOST:-nc_pqsql_db}
  35.     ports:
  36.      - '8088:80'
  37.     networks:
  38.      - nginx_proxy_frontend
  39.       - nginx_proxy_backend
  40.  
  41.   nextcloud-pgsql-db:
  42.     container_name: nc_pqsql_db
  43.     image: postgres:alpine
  44.     restart: always
  45.     volumes:
  46.      - db:/var/lib/postgresql/data
  47.     environment:
  48.       POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
  49.       POSTGRES_DATABASE: ${POSTGRES_DATABASE:-nextcloud}
  50.       POSTGRES_USER: ${POSTGRES_USER:-nextcloud}
  51.     ports:
  52.      - '5432:5432'
  53.     networks:
  54.      - nginx_proxy_backend
  55.  
  56.   nextcloud-pqsql-pgadmin:
  57.     container_name: nc_pgadmin
  58.     image: dpage/pgadmin4
  59.     environment:
  60.       PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:-admin@pgsql.com}
  61.       PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin}
  62.       PGADMIN_CONFIG_SERVER_MODE: 'False'
  63.       POSTGRES_HOST: ${POSTGRES_HOST:-nc_pqsql_db}
  64.     volumes:
  65.       - pgadmin:/var/lib/pgadmin
  66.     ports:
  67.      - "${PGADMIN_PORT:-5050}:80"
  68.     networks:
  69.      - nginx_proxy_frontend
  70.       - nginx_proxy_backend
  71.     restart: unless-stopped
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement