Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "devslab-kit-admin-ui (Vue)",
"image": "mcr.microsoft.com/devcontainers/typescript-node:24",
"workspaceFolder": "/workspace",
"postCreateCommand": "npm install",
"forwardPorts": [5173],
"runArgs": ["--add-host=host.docker.internal:host-gateway"],
"customizations": {
"vscode": {
"extensions": [
"Vue.volar",
"bradlc.vscode-tailwindcss",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
]
}
}
}
20 changes: 17 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,32 @@ jobs:
docker:
runs-on: ubuntu-latest
needs: build
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v4

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

- name: Build image (no push)
# PR 에서는 로그인/푸시하지 않고 빌드만 검증한다.
- name: Log in to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push image
uses: docker/build-push-action@v6
with:
context: .
push: false
tags: devslab-kit-admin-ui:ci-${{ github.sha }}
push: ${{ github.event_name != 'pull_request' }}
tags: |
ghcr.io/devslab-kr/devslab-kit-admin-ui:latest
ghcr.io/devslab-kr/devslab-kit-admin-ui:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
33 changes: 20 additions & 13 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
import { defineConfig } from 'vite'
import { defineConfig, loadEnv } from 'vite'
import vue from '@vitejs/plugin-vue'
import tailwindcss from '@tailwindcss/vite'
import { fileURLToPath, URL } from 'node:url'

// https://vite.dev/config/
export default defineConfig({
plugins: [vue(), tailwindcss()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '')

return {
plugins: [vue(), tailwindcss()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
},
server: {
proxy: {
'/admin/api': {
target: 'http://localhost:8080',
changeOrigin: true,
server: {
proxy: {
'/admin/api': {
// 기본값은 로컬 백엔드(중립). 이 repo 는 특정 백엔드(bookrecord 등)를 알지 않는다.
// 다른 백엔드를 가리키려면 .env.local 에 VITE_PROXY_TARGET 을 설정하라.
// 예) VITE_PROXY_TARGET=http://host.docker.internal:8080
target: env.VITE_PROXY_TARGET || 'http://localhost:8080',
changeOrigin: true,
},
},
},
},
}
})
Loading