Skip to content

Commit

Permalink
refactor: update Docker actions to latest versions and modify nginx c…
Browse files Browse the repository at this point in the history
…onfiguration for backend routing
  • Loading branch information
LeonardoMeireles55 committed Feb 5, 2025
1 parent 1cb8e2e commit 8aaddf5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 17 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/backend-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Ensure buildx cache
run: mkdir -p /tmp/.buildx-cache
Expand All @@ -31,7 +31,7 @@ jobs:
${{ runner.os }}-buildx-
- name: Log in to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
max_attempts=12
attempt=1
while [ $attempt -le $max_attempts ]; do
if curl -sSf https://lab-spec.systems/backend-api/actuator/health; then
if curl -sSf https://lab-spec.systems/backend/actuator/health; then
echo "Service is healthy!"
exit 0
fi
Expand Down
15 changes: 2 additions & 13 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -88,20 +88,9 @@ http {
add_header X-XSS-Protection "1; mode=block";
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;

# Next.js API routes
location /next-api/ {
proxy_pass http://quality-lab-pro-frontend/api/;
proxy_http_version 1.1;
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;
client_max_body_size 100m;
client_body_timeout 300s;
limit_req zone=my_limit burst=5 nodelay;
}

location / {

location /backend {
proxy_pass http://quality-lab-pro/;
proxy_http_version 1.1;
proxy_set_header Connection "";
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# ===============================
server.port=${SERVER_LOCAL_PORT:8080}
server.error.include-stacktrace=never
server.servlet.context-path=/v1
spring.profiles.active=${SPRING_PROFILES_ACTIVE:local}
spring.output.ansi.enabled=detect
spring.threads.virtual.enabled=true
Expand Down

0 comments on commit 8aaddf5

Please sign in to comment.