Skip to content

Commit

Permalink
added initial nginx config
Browse files Browse the repository at this point in the history
  • Loading branch information
nedvedba committed May 16, 2024
1 parent 83e0d13 commit 6fb05b3
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 8 deletions.
27 changes: 19 additions & 8 deletions compose/compose_core.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
version: '3.9'


services:
nginx:
depends_on: ["datafed_web"]
image: nginx:latest
ports:
- 443:443
volumes:
- ./keys:/keys
- ./nginx.conf:/etc/nginx/conf.d/nginx.conf
networks:
- datafed-internal

datafed-web:
depends_on: ["datafed-core"]
datafed_web:
depends_on: ["datafed_core"]
environment:
DATAFED_GLOBUS_APP_SECRET: "${DATAFED_GLOBUS_APP_SECRET}"
DATAFED_GLOBUS_APP_ID: "${DATAFED_GLOBUS_APP_ID}"
Expand All @@ -19,18 +28,20 @@ services:
DATAFED_CORE_ADDRESS_PORT_INTERNAL: "datafed-core:7513"
UID: "${DATAFED_UID}"
image: datafed-web:latest
ports:
- 443:443 # This must be the same port that is mapped to the host for redirects to work
# ports:
# - 8081:443
# ports:
# - 443:443 # This must be the same port that is mapped to the host for redirects to work
volumes:
- ./keys:/opt/datafed/keys
- ./logs:${DATAFED_CONTAINER_LOG_PATH}
networks:
- datafed-internal

datafed-core:
datafed_core:
image: datafed-core:latest
depends_on:
datafed-foxx:
datafed_foxx:
condition: service_healthy
environment:
DATAFED_GLOBUS_APP_SECRET: "${DATAFED_GLOBUS_APP_SECRET}"
Expand All @@ -54,7 +65,7 @@ services:
networks:
- datafed-internal

datafed-foxx:
datafed_foxx:
image: datafed-foxx:latest
depends_on: ["arango"]
environment:
Expand Down
21 changes: 21 additions & 0 deletions compose/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
server {
listen 443 ssl;

ssl_certificate /keys/cert.crt;
ssl_certificate_key /keys/cert.key;

location / {
proxy_pass https://datafed_web;
#proxy_ssl_server_name on;
#proxy_ssl_protocols TLSv1.2 TLSv1.3;
#proxy_ssl_verify off;
#proxy_ssl_verify_depth 2;
#proxy_ssl_trusted_certificate /keys/cert.crt;

proxy_ssl_verify off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}

0 comments on commit 6fb05b3

Please sign in to comment.