diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index c990f39..ee54dd1 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -6,23 +6,32 @@ on: - master jobs: - build-and-deploy: + build: runs-on: node-22 steps: - - name: ssh-keyscan + - name: Keyscan run: | mkdir ~/.ssh ssh-keyscan git.koptilnya.xyz >> ~/.ssh/known_hosts - - name: Checkout code + - name: Checkout uses: actions/checkout@v4 with: ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} ssh-strict: false persist-credentials: false - - name: Install dependencies + - name: Build + run: docker build -t paxton:latest . + + - name: Run run: | - yarn install - yarn build + docker run -d \ + --name paxton \ + --label "traefik.enable=true" \ + --label "traefik.http.routers.paxton.rule=Host(`paxton.koptilnya.xyz`)" \ + --label "traefik.http.routers.paxton.entrypoints=websecure" \ + --label "traefik.http.routers.paxton.tls.certresolver=myresolver" \ + --label "traefik.http.services.paxton.loadbalancer.server.port=80" \ + paxton:latest diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7d08fd5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM node:22 +WORKDIR /app +COPY package.json ./ +COPY yarn.lock ./ +RUN yarn install +COPY . . +RUN yarn build + +FROM nginx:alpine +COPY --from=build /app/dist /usr/share/nginx/html diff --git a/nuxt.config.ts b/nuxt.config.ts index 2e13cec..d7ed04b 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -1,5 +1,6 @@ // https://nuxt.com/docs/api/configuration/nuxt-config export default defineNuxtConfig({ + ssr: false, compatibilityDate: '2025-05-15', devtools: { enabled: true }, modules: ['@nuxt/ui', '@nuxt/image', '@nuxt/icon', '@nuxt/fonts', '@nuxtjs/i18n'],