mirror of
https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git
synced 2025-08-14 00:25:46 +02:00
testing pipe2
This commit is contained in:
73
.gitlab-ci.yml
Normal file
73
.gitlab-ci.yml
Normal file
@@ -0,0 +1,73 @@
|
||||
image: python:3.11
|
||||
|
||||
variables:
|
||||
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.pip-cache"
|
||||
|
||||
cache:
|
||||
paths:
|
||||
- .pip-cache/
|
||||
- backend/venv/
|
||||
|
||||
stages:
|
||||
- test
|
||||
- build
|
||||
- deploy
|
||||
|
||||
before_script:
|
||||
- python -V
|
||||
- python -m venv backend/venv
|
||||
- source backend/venv/bin/activate
|
||||
- pip install --upgrade pip
|
||||
|
||||
test:
|
||||
stage: test
|
||||
services:
|
||||
- redis:latest
|
||||
- postgres:15
|
||||
variables:
|
||||
POSTGRES_DB: app
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/app
|
||||
REDIS_HOST: redis
|
||||
script:
|
||||
- cd backend
|
||||
- pip install -r requirements.txt
|
||||
- pytest -v
|
||||
only:
|
||||
- main
|
||||
- merge_requests
|
||||
|
||||
lint:
|
||||
stage: test
|
||||
script:
|
||||
- cd backend
|
||||
- pip install flake8
|
||||
- flake8 .
|
||||
only:
|
||||
- main
|
||||
- merge_requests
|
||||
|
||||
build:
|
||||
stage: build
|
||||
script:
|
||||
- cd backend
|
||||
- pip install -r requirements.txt
|
||||
- echo "Building application..."
|
||||
- python -c "import sys; print(sys.version)"
|
||||
artifacts:
|
||||
paths:
|
||||
- backend/
|
||||
only:
|
||||
- main
|
||||
|
||||
deploy:
|
||||
stage: deploy
|
||||
script:
|
||||
- echo "Deploying application..."
|
||||
- cd backend
|
||||
- alembic upgrade head
|
||||
environment:
|
||||
name: production
|
||||
only:
|
||||
- main
|
13
README.md
13
README.md
@@ -1,2 +1,11 @@
|
||||
# AdministrationItDepartmens
|
||||
Site for teh support
|
||||
# Administration Project
|
||||
|
||||
[](https://gitlab.com/mysite7215201/Administration/-/commits/main)
|
||||
|
||||
## Description
|
||||
Project for managing administrative tasks
|
||||
|
||||
## CI/CD Status
|
||||
- Last test run: Pending
|
||||
- Build status: Pending
|
||||
- Deploy status: Pending
|
||||
|
@@ -1,60 +1,40 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
ports:
|
||||
- "80:80"
|
||||
volumes:
|
||||
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
|
||||
depends_on:
|
||||
- frontend
|
||||
- backend
|
||||
restart: always
|
||||
|
||||
frontend:
|
||||
container_name: support-frontend
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/frontend/Dockerfile
|
||||
volumes:
|
||||
- ./frontend:/app
|
||||
- /app/node_modules
|
||||
environment:
|
||||
- NODE_ENV=development
|
||||
- VITE_API_URL=/api
|
||||
depends_on:
|
||||
- backend
|
||||
|
||||
backend:
|
||||
container_name: support-backend
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/backend/Dockerfile
|
||||
volumes:
|
||||
- ./backend:/app
|
||||
image: ${CI_REGISTRY_IMAGE}/backend:latest
|
||||
restart: always
|
||||
environment:
|
||||
- DATABASE_URL=postgresql://postgres:postgres123@db:5432/support_db
|
||||
- REDIS_URL=redis://redis:6379/0
|
||||
- DATABASE_URL=postgresql://postgres:postgres@db:5432/app
|
||||
- REDIS_HOST=redis
|
||||
- REDIS_PORT=6379
|
||||
- SECRET_KEY=${SECRET_KEY}
|
||||
- TELEGRAM_BOT_TOKEN=${TELEGRAM_BOT_TOKEN}
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
|
||||
frontend:
|
||||
image: ${CI_REGISTRY_IMAGE}/frontend:latest
|
||||
restart: always
|
||||
ports:
|
||||
- "80:80"
|
||||
depends_on:
|
||||
- backend
|
||||
|
||||
db:
|
||||
container_name: support-db
|
||||
image: postgres:15
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
restart: always
|
||||
environment:
|
||||
- POSTGRES_USER=postgres
|
||||
- POSTGRES_PASSWORD=postgres123
|
||||
- POSTGRES_DB=support_db
|
||||
ports:
|
||||
- "5432:5432"
|
||||
- POSTGRES_PASSWORD=postgres
|
||||
- POSTGRES_DB=app
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
|
||||
redis:
|
||||
container_name: support-redis
|
||||
image: redis:alpine
|
||||
image: redis:latest
|
||||
restart: always
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
|
||||
|
@@ -15,7 +15,7 @@
|
||||
</router-link>
|
||||
|
||||
<router-link
|
||||
to="/admin"
|
||||
to="/admin/login"
|
||||
class="block w-full py-3 px-4 text-center text-indigo-700 bg-indigo-100 hover:bg-indigo-200 rounded-lg transition-colors duration-200 font-medium border-2 border-indigo-200"
|
||||
>
|
||||
Вход для администраторов
|
||||
|
@@ -1,5 +0,0 @@
|
||||
[33m62552a1[m[33m ([m[1;36mHEAD[m[33m -> [m[1;32mtest[m[33m)[m dd
|
||||
[33m26b09c0[m test2
|
||||
[33m8fde7f1[m[33m ([m[1;31morigin/test[m[33m)[m test
|
||||
[33m787d195[m[33m ([m[1;32mwebsoc[m[33m)[m тестd32123322вд
|
||||
[33m7399092[m тестd32123322в
|
Reference in New Issue
Block a user