Skip to content

Commit

Permalink
Merge pull request #614 from NBISweden/fix/psqladmin
Browse files Browse the repository at this point in the history
Fix/psqladmin
  • Loading branch information
jhagberg authored Feb 9, 2023
2 parents 45e573e + c2feaf6 commit 1c6b915
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 42 deletions.
94 changes: 52 additions & 42 deletions production.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,56 @@
---
version: "3.4"
services:
database:
restart: always
image: postgres:12
container_name: herdbook-db
env_file:
- ./.docker/database-variables.env
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
volumes:
- ./postgres-data:/var/lib/postgresql/data
main:
image: ghcr.io/nbisweden/herdbook_main:${TAG:?TAG-not-set}
container_name: herdbook-main
env_file:
- ./.docker/database-variables.env
- ./.docker/r-api-variables.env
- ./.docker/main-api-variables.env
ports:
- 80:8080
- 443:8443
- 9090:9090
volumes:
- type: bind
source: ./app
target: /api_src
- type: bind
source: ./config
target: /config
- type: bind
source: ./logs
target: /logs
depends_on:
- database
- r-api
restart: always
database:
restart: always
image: postgres:12
container_name: herdbook-db
env_file:
- ./.docker/database-variables.env
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
volumes:
- ./postgres-data:/var/lib/postgresql/data
pgadmin:
restart: always
image: dpage/pgadmin4:latest
hostname: pgadmin
volumes:
- ./pgadmin:/var/lib/pgadmin
environment:
- PGADMIN_DEFAULT_EMAIL=UPDATEME
- PGADMIN_DEFAULT_PASSWORD=UPDATEME
- GUNICORN_ACCESS_LOGFILE=/dev/null
main:
image: ghcr.io/nbisweden/herdbook_main:${TAG:?TAG-not-set}
container_name: herdbook-main
env_file:
- ./.docker/database-variables.env
- ./.docker/r-api-variables.env
- ./.docker/main-api-variables.env
ports:
- 80:8080
- 443:8443
- 9090:9090
volumes:
- type: bind
source: ./app
target: /api_src
- type: bind
source: ./config
target: /config
- type: bind
source: ./logs
target: /logs
depends_on:
- database
- r-api
restart: always

r-api:
image: ghcr.io/nbisweden/herdbook_r-api:${TAG:?TAG-not-set}
container_name: r-api
env_file:
- ./.docker/database-variables.env
- ./.docker/r-api-variables.env
restart: always
r-api:
image: ghcr.io/nbisweden/herdbook_r-api:${TAG:?TAG-not-set}
container_name: r-api
env_file:
- ./.docker/database-variables.env
- ./.docker/r-api-variables.env
restart: always
11 changes: 11 additions & 0 deletions system/herdbook.standalone.nginx
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,15 @@
# use its built in http server.
proxy_pass http://127.0.0.1:9090/api/;
}

location ^~ /pgadmin {
proxy_pass http://pgadmin/;
proxy_http_version 1.1;
proxy_set_header X-Script-Name /pgadmin;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_redirect off;
}
}

0 comments on commit 1c6b915

Please sign in to comment.