Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
Librephotos Docker Scaling
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dev Ops
Librephotos Docker Scaling
Commits
feff488b
Unverified
Commit
feff488b
authored
2 years ago
by
Niaz Faridani-Rad
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #88 from sickelap/fix_k8s_proxy_config
fix k8s proxy config
parents
00d97785
e3ab1fba
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
docker-compose.e2e.raw
+1
-3
1 addition, 3 deletions
docker-compose.e2e.raw
docker-compose.e2e.yml
+1
-3
1 addition, 3 deletions
docker-compose.e2e.yml
proxy/Dockerfile
+1
-5
1 addition, 5 deletions
proxy/Dockerfile
proxy/nginx.conf
+9
-9
9 additions, 9 deletions
proxy/nginx.conf
with
12 additions
and
20 deletions
docker-compose.e2e.raw
+
1
−
3
View file @
feff488b
...
@@ -13,9 +13,7 @@ services:
...
@@ -13,9 +13,7 @@ services:
image: reallibrephotos/librephotos-proxy:${tag}
image: reallibrephotos/librephotos-proxy:${tag}
container_name: e2e-__proxy_name__
container_name: e2e-__proxy_name__
restart: unless-stopped
restart: unless-stopped
environment:
command: /bin/bash -c "sed -ri 's/(__backend_name__|__frontend_name__)/e2e-\1/' /etc/nginx/nginx.conf && nginx -g 'daemon off;'"
BACKEND_NAME: e2e-__backend_name__
FRONTEND_NAME: e2e-__frontend_name__
volumes:
volumes:
- e2e_scan_directory:/data
- e2e_scan_directory:/data
- e2e_protected_media:/protected_media
- e2e_protected_media:/protected_media
...
...
This diff is collapsed.
Click to expand it.
docker-compose.e2e.yml
+
1
−
3
View file @
feff488b
...
@@ -13,9 +13,7 @@ services:
...
@@ -13,9 +13,7 @@ services:
image
:
reallibrephotos/librephotos-proxy:${tag}
image
:
reallibrephotos/librephotos-proxy:${tag}
container_name
:
e2e-proxy
container_name
:
e2e-proxy
restart
:
unless-stopped
restart
:
unless-stopped
environment
:
command
:
/bin/bash -c "sed -ri 's/(backend|frontend)/e2e-\1/' /etc/nginx/nginx.conf && nginx -g 'daemon off;'"
BACKEND_NAME
:
e2e-backend
FRONTEND_NAME
:
e2e-frontend
volumes
:
volumes
:
-
e2e_scan_directory:/data
-
e2e_scan_directory:/data
-
e2e_protected_media:/protected_media
-
e2e_protected_media:/protected_media
...
...
This diff is collapsed.
Click to expand it.
proxy/Dockerfile
+
1
−
5
View file @
feff488b
FROM
nginx
FROM
nginx
ENV
BACKEND_NAME=${BACKEND_NAME:-backend}
COPY
nginx.conf /etc/nginx/nginx.conf
ENV
FRONTEND_NAME=${FRONTEND_NAME:-frontend}
ENV
VAR_PREFIX='$'
COPY
nginx.tpl /etc/nginx/nginx.tpl
ENTRYPOINT
envsubst < /etc/nginx/nginx.tpl > /etc/nginx/nginx.conf; nginx -g 'daemon off;'
This diff is collapsed.
Click to expand it.
proxy/nginx.
tpl
→
proxy/nginx.
conf
+
9
−
9
View file @
feff488b
...
@@ -16,21 +16,21 @@ http {
...
@@ -16,21 +16,21 @@ http {
# Always proxy to root with the same page request when nginx 404s
# Always proxy to root with the same page request when nginx 404s
error_page
404
/
;
error_page
404
/
;
proxy_intercept_errors
on
;
proxy_intercept_errors
on
;
proxy_set_header Host $
{
VAR_PREFIX
}
host;
proxy_set_header
Host
$host
;
proxy_pass http://
$
{
FRONTEND_NAME
}
:3000/;
proxy_pass
http://
frontend
:3000/
;
}
}
location
~
^/(api|media)/
{
location
~
^/(api|media)/
{
proxy_set_header X-Forwarded-Proto $
{
VAR_PREFIX
}
scheme;
proxy_set_header
X-Forwarded-Proto
$scheme
;
proxy_set_header X-Real-IP $
{
VAR_PREFIX
}
remote_addr;
proxy_set_header
X-Real-IP
$remote_addr
;
proxy_set_header Host
$
{
BACKEND_NAME
}
;
proxy_set_header
Host
backend
;
include
uwsgi_params
;
include
uwsgi_params
;
proxy_pass http://
$
{
BACKEND_NAME
}
:8001;
proxy_pass
http://
backend
:8001
;
}
}
# needed for webpack-dev-server
# needed for webpack-dev-server
location
/ws
{
location
/ws
{
proxy_pass http://
$
{
FRONTEND_NAME
}
:3000;
proxy_pass
http://
frontend
:3000
;
proxy_http_version
1.1
;
proxy_http_version
1.1
;
proxy_set_header Upgrade $
{
VAR_PREFIX
}
http_upgrade;
proxy_set_header
Upgrade
$http_upgrade
;
proxy_set_header
Connection
"upgrade"
;
proxy_set_header
Connection
"upgrade"
;
}
}
# Django media
# Django media
...
@@ -40,7 +40,7 @@ http {
...
@@ -40,7 +40,7 @@ http {
}
}
location
/static/drf-yasg
{
location
/static/drf-yasg
{
proxy_pass http://
$
{
BACKEND_NAME
}
:8001;
proxy_pass
http://
backend
:8001
;
}
}
location
/data
{
location
/data
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment