Skip to content

Commit

Permalink
chore: admin 관련 컨테이너 및 프록시 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
mikekks committed Nov 30, 2024
1 parent 5459af2 commit e20716c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
18 changes: 18 additions & 0 deletions layer-api/infra/development/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,24 @@ services:
- java-app
restart: always

admin-app:
image: docker.io/clean01/layer-server_layer-admin:latest #
container_name: layer-admin
ports:
- "3000:3000"
environment:
- TZ=Asia/Seoul
- SPRING_PROFILES_ACTIVE=dev
volumes:
- ./application-secret.properties:/config/application-secret.properties
- ./log:/log
- ./tokens:/config/tokens
networks:
- app-network
depends_on:
- java-app
restart: always

nginx:
image: nginx:latest
container_name: nginx
Expand Down
12 changes: 12 additions & 0 deletions layer-api/infra/development/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ http {
server layer-api:8080;
}

upstream layer-admin {
server layer-admin:3000;
}

server {
listen 80;

Expand All @@ -15,5 +19,13 @@ http {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}

location /admin/ {
proxy_pass http://layer-admin; # Proxy to layer-admin
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 e20716c

Please sign in to comment.