Initial commit

This commit is contained in:
wsc-admin
2026-04-02 19:35:50 +09:00
commit fd3aa6b84f
7 changed files with 58 additions and 0 deletions

24
.gitea/workflows/ci.yaml Normal file
View File

@@ -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"}'

4
.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
node_modules
dist
.DS_Store
*.local

1
.npmrc Normal file
View File

@@ -0,0 +1 @@
registry=http://verdaccio.webtech.worldskillskorea.io

7
Dockerfile Normal file
View File

@@ -0,0 +1,7 @@
FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 80
CMD ["node", "main.js"]

3
README.md Normal file
View File

@@ -0,0 +1,3 @@
# Node App
Your REST API backend should listen on port 80

11
main.js Normal file
View File

@@ -0,0 +1,11 @@
const express = require('express')
const app = express()
const PORT = 80
app.get('/', (req, res) => {
res.json({ message: 'Hello from Node App!' })
})
app.listen(PORT, () => {
console.log(`Server running on port ${PORT}`)
})

8
package.json Normal file
View File

@@ -0,0 +1,8 @@
{
"name": "node-app",
"private": true,
"version": "1.0.0",
"dependencies": {
"express": "^4.21.0"
}
}