Add deployment scripts and docker-compose configs for OCI

This commit is contained in:
윤희준
2026-08-15 07:22:42 +09:00
parent fc21710e60
commit 7209f5610f
4 changed files with 232 additions and 0 deletions

21
deploy.sh Normal file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
APP_DIR="/home/ubuntu/apps/dap-mcp"
# 1. Update and Build Gateway (dapms)
cd $APP_DIR/dap-was-dapms
git pull
docker run --rm -v $(pwd):/app -w /app eclipse-temurin:21-jdk-alpine sh -c "chmod +x gradlew && ./gradlew clean build -x test"
# 2. Update and Build Tools (dapmt)
cd $APP_DIR/dap-was-dapmt
git pull
docker run --rm -v $(pwd):/app -w /app eclipse-temurin:21-jdk-alpine sh -c "chmod +x gradlew && ./gradlew clean build -x test"
# 3. Deploy
cd $APP_DIR
docker compose build
docker compose up -d
# 4. Cleanup
docker system prune -f

83
docker-compose.local.yml Normal file
View File

@@ -0,0 +1,83 @@
name: ax_hub_mcp_local
services:
gateway:
build:
context: ./dap-was-dapms
dockerfile: Dockerfile
ports:
- "8081:8080"
environment:
- TZ=Asia/Seoul
was-sal:
build:
context: ./dap-was-dapmt
dockerfile: dap-was-sal/Dockerfile
ports:
- "8282:8082"
environment:
- TZ=Asia/Seoul
- AXHUB_GATEWAY_URL=http://gateway:8080
- AXHUB_TOOL_URL=http://was-sal:8082
- GLOW_COMMUNICATION_MCI_HOST=http://mci-mock
- GLOW_COMMUNICATION_MCI_PORT=8080
- GLOW_COMMUNICATION_EXTMCI_HOST=http://mci-mock
- GLOW_COMMUNICATION_EXTMCI_PORT=8080
- GLOW_COMMUNICATION_EAI_HOST=http://mci-mock
- GLOW_COMMUNICATION_EAI_PORT=8080
- SPRING_PROFILES_ACTIVE=local
was-cus:
build:
context: ./dap-was-dapmt
dockerfile: dap-was-cus/Dockerfile
ports:
- "8284:8084"
environment:
- TZ=Asia/Seoul
- AXHUB_GATEWAY_URL=http://gateway:8080
- AXHUB_TOOL_URL=http://was-cus:8084
- GLOW_COMMUNICATION_MCI_HOST=http://mci-mock
- GLOW_COMMUNICATION_MCI_PORT=8080
- GLOW_COMMUNICATION_EXTMCI_HOST=http://mci-mock
- GLOW_COMMUNICATION_EXTMCI_PORT=8080
- GLOW_COMMUNICATION_EAI_HOST=http://mci-mock
- GLOW_COMMUNICATION_EAI_PORT=8080
- SPRING_PROFILES_ACTIVE=local
was-pro:
build:
context: ./dap-was-dapmt
dockerfile: dap-was-pro/Dockerfile
ports:
- "8285:8085"
environment:
- TZ=Asia/Seoul
- AXHUB_GATEWAY_URL=http://gateway:8080
- AXHUB_TOOL_URL=http://was-pro:8085
- GLOW_COMMUNICATION_MCI_HOST=http://mci-mock
- GLOW_COMMUNICATION_MCI_PORT=8080
- GLOW_COMMUNICATION_EXTMCI_HOST=http://mci-mock
- GLOW_COMMUNICATION_EXTMCI_PORT=8080
- GLOW_COMMUNICATION_EAI_HOST=http://mci-mock
- GLOW_COMMUNICATION_EAI_PORT=8080
- SPRING_PROFILES_ACTIVE=local
was-sys:
build:
context: ./dap-was-dapmt
dockerfile: dap-was-sys/Dockerfile
ports:
- "8286:8086"
environment:
- TZ=Asia/Seoul
- AXHUB_GATEWAY_URL=http://gateway:8080
- AXHUB_TOOL_URL=http://was-sys:8086
- GLOW_COMMUNICATION_MCI_HOST=http://mci-mock
- GLOW_COMMUNICATION_MCI_PORT=8080
- GLOW_COMMUNICATION_EXTMCI_HOST=http://mci-mock
- GLOW_COMMUNICATION_EXTMCI_PORT=8080
- GLOW_COMMUNICATION_EAI_HOST=http://mci-mock
- GLOW_COMMUNICATION_EAI_PORT=8080
- SPRING_PROFILES_ACTIVE=local

98
docker-compose.prod.yml Normal file
View File

@@ -0,0 +1,98 @@
name: ax_hub_mcp
services:
gateway:
build:
context: ./dap-was-dapms
dockerfile: Dockerfile
ports:
- "127.0.0.1:9281:8080"
environment:
- TZ=Asia/Seoul
restart: always
was-sal:
build:
context: ./dap-was-dapmt
dockerfile: dap-was-sal/Dockerfile
ports:
- "127.0.0.1:9282:8082"
environment:
- TZ=Asia/Seoul
- AXHUB_GATEWAY_URL=http://gateway:8080
- AXHUB_TOOL_URL=http://was-sal:8082
- GLOW_COMMUNICATION_MCI_HOST=http://mci-mock
- GLOW_COMMUNICATION_MCI_PORT=8080
- GLOW_COMMUNICATION_EXTMCI_HOST=http://mci-mock
- GLOW_COMMUNICATION_EXTMCI_PORT=8080
- GLOW_COMMUNICATION_EAI_HOST=http://mci-mock
- GLOW_COMMUNICATION_EAI_PORT=8080
- SPRING_PROFILES_ACTIVE=dev
restart: always
was-cus:
build:
context: ./dap-was-dapmt
dockerfile: dap-was-cus/Dockerfile
ports:
- "127.0.0.1:9284:8084"
environment:
- TZ=Asia/Seoul
- AXHUB_GATEWAY_URL=http://gateway:8080
- AXHUB_TOOL_URL=http://was-cus:8084
- GLOW_COMMUNICATION_MCI_HOST=http://mci-mock
- GLOW_COMMUNICATION_MCI_PORT=8080
- GLOW_COMMUNICATION_EXTMCI_HOST=http://mci-mock
- GLOW_COMMUNICATION_EXTMCI_PORT=8080
- GLOW_COMMUNICATION_EAI_HOST=http://mci-mock
- GLOW_COMMUNICATION_EAI_PORT=8080
- SPRING_PROFILES_ACTIVE=dev
restart: always
was-pro:
build:
context: ./dap-was-dapmt
dockerfile: dap-was-pro/Dockerfile
ports:
- "127.0.0.1:9285:8085"
environment:
- TZ=Asia/Seoul
- AXHUB_GATEWAY_URL=http://gateway:8080
- AXHUB_TOOL_URL=http://was-pro:8085
- GLOW_COMMUNICATION_MCI_HOST=http://mci-mock
- GLOW_COMMUNICATION_MCI_PORT=8080
- GLOW_COMMUNICATION_EXTMCI_HOST=http://mci-mock
- GLOW_COMMUNICATION_EXTMCI_PORT=8080
- GLOW_COMMUNICATION_EAI_HOST=http://mci-mock
- GLOW_COMMUNICATION_EAI_PORT=8080
- SPRING_PROFILES_ACTIVE=dev
restart: always
was-sys:
build:
context: ./dap-was-dapmt
dockerfile: dap-was-sys/Dockerfile
ports:
- "127.0.0.1:9286:8086"
environment:
- TZ=Asia/Seoul
- AXHUB_GATEWAY_URL=http://gateway:8080
- AXHUB_TOOL_URL=http://was-sys:8086
- GLOW_COMMUNICATION_MCI_HOST=http://mci-mock
- GLOW_COMMUNICATION_MCI_PORT=8080
- GLOW_COMMUNICATION_EXTMCI_HOST=http://mci-mock
- GLOW_COMMUNICATION_EXTMCI_PORT=8080
- GLOW_COMMUNICATION_EAI_HOST=http://mci-mock
- GLOW_COMMUNICATION_EAI_PORT=8080
- SPRING_PROFILES_ACTIVE=dev
restart: always
gitea-runner:
image: gitea/act_runner:latest
environment:
- GITEA_INSTANCE_URL=https://git.devjun.net
- GITEA_RUNNER_REGISTRATION_TOKEN=2N7ciuFIp2Jm29EWtzfl7ruQtpwGgB4ngFcXC2lF
- GITEA_RUNNER_NAME=ociwp-runner
volumes:
- /var/run/docker.sock:/var/run/docker.sock
restart: always

30
setup_apache.sh Normal file
View File

@@ -0,0 +1,30 @@
#!/bin/bash
# Apache configuration setup for DAP-MCP
create_vhost() {
local domain=$1
local port=$2
local conf_file="/etc/apache2/sites-available/${domain}.conf"
echo "<VirtualHost *:80>
ServerName ${domain}
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:${port}/
ProxyPassReverse / http://127.0.0.1:${port}/
ErrorLog \${APACHE_LOG_DIR}/${domain}_error.log
CustomLog \${APACHE_LOG_DIR}/${domain}_access.log combined
</VirtualHost>" > "$conf_file"
a2ensite "${domain}.conf"
}
create_vhost "mcp.devjun.net" "9281"
create_vhost "tool-sal.devjun.net" "9282"
create_vhost "tool-cus.devjun.net" "9284"
create_vhost "tool-pro.devjun.net" "9285"
create_vhost "tool-sys.devjun.net" "9286"
apache2ctl configtest && systemctl reload apache2