commit 8018f89dd529a28f8acf635f8c66f99062990d42 Author: wsc-admin Date: Thu Apr 2 19:35:39 2026 +0900 Initial commit diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml new file mode 100644 index 0000000..80fcc00 --- /dev/null +++ b/.gitea/workflows/ci.yaml @@ -0,0 +1,24 @@ +name: Build and deploy +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Build Docker image + run: DOCKER_BUILDKIT=0 docker build --network=wsc2026-infra_wsc-network . --tag git.webtech.worldskillskorea.io/${{ github.repository }}:latest + + - name: Login to registry + run: echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login git.webtech.worldskillskorea.io -u ${{ secrets.REGISTRY_USERNAME }} --password-stdin + + - name: Push image + run: docker push git.webtech.worldskillskorea.io/${{ github.repository }}:latest + + - name: Deploy + run: | + curl -s -X POST https://admin.webtech.worldskillskorea.io/api/deploy \ + -H "Authorization: Bearer ${{ secrets.PULLDECK_TOKEN }}" \ + -H "Content-Type: application/json" \ + -d '{"image":"git.webtech.worldskillskorea.io/${{ github.repository }}:latest"}' \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e9b06f0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +node_modules +dist +.DS_Store +*.local \ No newline at end of file diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..55ef363 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +registry=http://verdaccio.webtech.worldskillskorea.io \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1e8867d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +# build stage +FROM node:lts-alpine as build-stage +WORKDIR /app +COPY package*.json ./ +RUN npm install +COPY . . +RUN npm run build + +# production stage +FROM nginx:stable-alpine as production-stage +COPY --from=build-stage /app/dist /usr/share/nginx/html +EXPOSE 80 +COPY nginx.conf /etc/nginx/conf.d/default.conf +CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..de18d06 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# Vue 3 + Vite \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..88083cb --- /dev/null +++ b/index.html @@ -0,0 +1,12 @@ + + + + + + Vue App + + +
+ + + \ No newline at end of file diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..764f902 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,9 @@ +server { + listen 80; + + location / { + root /usr/share/nginx/html/; + include /etc/nginx/mime.types; + try_files $uri $uri/ /index.html; + } +} \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..2ed9f01 --- /dev/null +++ b/package.json @@ -0,0 +1,18 @@ +{ + "name": "vue-app", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview" + }, + "dependencies": { + "vue": "^3.5.13" + }, + "devDependencies": { + "@vitejs/plugin-vue": "^5.2.1", + "vite": "^6.2.0" + } +} \ No newline at end of file diff --git a/public/vite.svg b/public/vite.svg new file mode 100644 index 0000000..e69de29 diff --git a/src/App.vue b/src/App.vue new file mode 100644 index 0000000..fd1a0e4 --- /dev/null +++ b/src/App.vue @@ -0,0 +1,15 @@ + + + + + \ No newline at end of file diff --git a/src/main.js b/src/main.js new file mode 100644 index 0000000..58cdcf4 --- /dev/null +++ b/src/main.js @@ -0,0 +1,4 @@ +import { createApp } from 'vue' +import App from './App.vue' + +createApp(App).mount('#app') \ No newline at end of file diff --git a/vite.config.js b/vite.config.js new file mode 100644 index 0000000..13af3aa --- /dev/null +++ b/vite.config.js @@ -0,0 +1,6 @@ +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' + +export default defineConfig({ + plugins: [vue()], +}) \ No newline at end of file