feat(): Added ci restruct project and add dockerfile
This commit is contained in:
1 parent
5451970f02
commit
8aa8e04077
70 files changed
+81
-11
No files matched your search
@@ -0,0 +1,53 @@
|
|||||||
|
name: Build, Test and Push Flask App
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main, master ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker-build-and-push:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install Docker CLI
|
||||||
|
run: |
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y docker.io
|
||||||
|
docker --version
|
||||||
|
|
||||||
|
- name: Configure Docker CLI for insecure registry
|
||||||
|
run: |
|
||||||
|
mkdir -p ~/.docker
|
||||||
|
echo '{"insecure-registries" : ["git.rustprogersteam.ru"]}' > ~/.docker/config.json
|
||||||
|
cat ~/.docker/config.json
|
||||||
|
|
||||||
|
- name: 'Docker Tags'
|
||||||
|
id: tags
|
||||||
|
uses: https://github.com/cssnr/docker-tags-action@v2
|
||||||
|
with:
|
||||||
|
images: 'git.rustprogersteam.ru/pvhproject/pvhfrontend/'
|
||||||
|
|
||||||
|
- name: Login to Docker Registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: git.rustprogersteam.ru
|
||||||
|
username: ${{ vars.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Build and push Docker image
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
git.rustprogersteam.ru/pvhproject/pvhfrontend/pvh:latest
|
||||||
|
git.rustprogersteam.ru/pvhproject/pvhfrontend/pvh:${{ github.sha }}
|
||||||
|
labels: ${{ steps.tags.outputs.labels }}
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
File renamed without changes.
+10
@@ -0,0 +1,10 @@
|
|||||||
|
FROM mkenney/npm:node-11-alpine
|
||||||
|
|
||||||
|
WORKDIR /web/app
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN npm install
|
||||||
|
RUN npm cache clean --force
|
||||||
|
|
||||||
|
CMD ["npm", "run", "dev"]
|
||||||
File renamed without changes.
File renamed without changes.
@@ -1,11 +0,0 @@
|
|||||||
import { defineConfig } from 'vite'
|
|
||||||
import react from '@vitejs/plugin-react'
|
|
||||||
|
|
||||||
// https://vite.dev/config/
|
|
||||||
export default defineConfig({
|
|
||||||
plugins: [react()],
|
|
||||||
server: {
|
|
||||||
port: 5173,
|
|
||||||
host: true, // попробуйте добавить эту строку
|
|
||||||
}
|
|
||||||
})
|
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,18 @@
|
|||||||
|
import { defineConfig } from 'vite'
|
||||||
|
import react from '@vitejs/plugin-react'
|
||||||
|
|
||||||
|
// https://vite.dev/config/
|
||||||
|
export default defineConfig({
|
||||||
|
plugins: [react()],
|
||||||
|
server: {
|
||||||
|
host: '0.0.0.0', // Слушаем все интерфейсы
|
||||||
|
port: 5173,
|
||||||
|
allowedHosts: ['rustprogersteam.ru'],
|
||||||
|
strictPort: true, // Запрещаем автоматический выбор порта
|
||||||
|
hmr: {
|
||||||
|
clientPort: 5173, // Важно для HMR в Docker
|
||||||
|
},
|
||||||
|
// Разрешаем CORS для внешних запросов
|
||||||
|
cors: true
|
||||||
|
}
|
||||||
|
})
|
||||||
Reference in new issue
Block a user