Compare commits

...

7 Commits

Author SHA1 Message Date
c55f7a972c Merge remote-tracking branch 'origin/dev'
All checks were successful
Build and Push Docker Image / build (push) Successful in 59s
2025-12-14 16:47:12 +03:00
5693701aa5 Merge remote-tracking branch 'origin/dev'
All checks were successful
Build and Push Docker Image / build (push) Successful in 44s
2025-11-19 22:00:26 +03:00
d9f449f0b8 Merge remote-tracking branch 'origin/dev'
Some checks failed
Build and Push Docker Image / build (push) Failing after 48s
2025-11-19 21:10:58 +03:00
04da2b565a Merge remote-tracking branch 'origin/dev'
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m14s
2025-11-05 20:56:37 +03:00
070edbfc42 Merge pull request 'dev' (#1) from dev into main
All checks were successful
Build and Push Docker Image / build (push) Successful in 33s
Reviewed-on: #1
2025-11-02 22:02:11 +00:00
Виталий Лавшонок
a4480db444 Merge branch 'dev'
All checks were successful
Build and Push Docker Image / build (push) Successful in 46s
2025-10-27 18:01:55 +03:00
f2baf189e4 Добавлен CI
Some checks failed
Build and Push Docker Image / build (push) Failing after 39s
2025-10-27 17:45:16 +03:00
2 changed files with 64 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
name: Build and Push Docker Image
on:
push:
branches: [ main ]
env:
REGISTRY: git.nullptr.top
IMAGE_NAME: git.nullptr.top/liquidcode/liquidcode-frontend
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: liquidcode-ci-service
password: ${{ secrets.SERVICE_ACCOUNT_TOKEN }}
- name: Build and Push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ env.IMAGE_NAME }}:latest,${{ env.IMAGE_NAME }}:${{ gitea.sha }}
cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache
cache-to: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache,mode=max

29
Dockerfile Normal file
View File

@@ -0,0 +1,29 @@
# Build stage
FROM node:20-alpine AS build
WORKDIR /app
# Copy package files
COPY package.json package-lock.json ./
# Install dependencies
RUN npm ci
# Copy source code
COPY . .
# Build the application
RUN npm run build
# Production stage
FROM node:20-alpine AS runtime
WORKDIR /app
# Install a simple HTTP server to serve static files
RUN npm install -g serve
# Copy built application from build stage
COPY --from=build /app/dist ./dist
EXPOSE 3000
CMD ["serve", "-s", "dist", "-l", "3000"]