Skip to content

Commit

Permalink
fix: proxy issue with container name
Browse files Browse the repository at this point in the history
  • Loading branch information
macloux-dd committed Jan 24, 2024
1 parent b4a2565 commit 947c842
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions docker-compose.staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ version: '3.6'

services:
project-application:
container_name: project-application-staging
env_file:
- ${PROJECT_APPLICATION_STAGING_ENV_FILE}
logging:
Expand All @@ -11,6 +12,7 @@ services:
tag: project-application-staging.django

reverse-proxy:
container_name: reverse-proxy-staging
environment:
- VIRTUAL_HOST=${PROJECT_APPLICATION_STAGING_DOMAINS}
- LETSENCRYPT_HOST=${PROJECT_APPLICATION_STAGING_DOMAINS}
Expand All @@ -23,6 +25,7 @@ services:
tag: project-application-staging.nginx

database:
container_name: database-staging
environment:
- MYSQL_USER=${PROJECT_APPLICATION_STAGING_DB_USER}
- MYSQL_PASSWORD=${PROJECT_APPLICATION_STAGING_DB_PASSWORD}
Expand Down
6 changes: 3 additions & 3 deletions nginx-staging/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ http {
listen 80;

location / {
proxy_pass http://project-application:8085;
proxy_pass http://project-application-staging:8085;

# Authentication during prototyping
auth_basic "Staging";
Expand All @@ -29,14 +29,14 @@ http {
}
# Remove basic auth for proposal access
location /proposal/ {
proxy_pass http://project-application:8085;
proxy_pass http://project-application-staging:8085;

proxy_set_header Host $http_host;
proxy_redirect off;
}
# Remove basic auth for api access
location /api/v1/ {
proxy_pass http://project-application:8085;
proxy_pass http://project-application-staging:8085;

proxy_set_header Host $http_host;
proxy_redirect off;
Expand Down

0 comments on commit 947c842

Please sign in to comment.