update: test.yaml
This commit is contained in:
parent
5d9073c19c
commit
9ef75e4377
15
.github/workflows/test.yaml
vendored
15
.github/workflows/test.yaml
vendored
@ -9,10 +9,10 @@ jobs:
|
|||||||
runs-on: test
|
runs-on: test
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: https://git.bellacocool.com/actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Docker Build and Push
|
- name: Docker Build and Push
|
||||||
run: |
|
run: |
|
||||||
docker build -t git.bellacocool.com/jsy/epr:latest .
|
docker build -t gitea.xkkxyy.com/Kai/my-django:latest .
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
@ -20,13 +20,4 @@ jobs:
|
|||||||
needs: build
|
needs: build
|
||||||
steps:
|
steps:
|
||||||
- name: Deploy to Test
|
- name: Deploy to Test
|
||||||
run: cd /opt/docker && docker compose -f docker-compose.yaml -f epr/docker-compose.yaml up -d
|
run: cd /opt/docker && docker compose -f docker-compose.yaml -f my-django/docker-compose.yaml up -d
|
||||||
|
|
||||||
release:
|
|
||||||
runs-on: test
|
|
||||||
needs: build
|
|
||||||
steps:
|
|
||||||
- name: Release Package
|
|
||||||
run: |
|
|
||||||
docker run --rm -e GITHUB_RUN_NUMBER=$GITHUB_RUN_NUMBER git.bellacocool.com/jsy/epr sh release.sh
|
|
||||||
|
|
||||||
|
|||||||
14
deploy/compose-test.yaml
Normal file
14
deploy/compose-test.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
version: '3'
|
||||||
|
|
||||||
|
services:
|
||||||
|
my-django:
|
||||||
|
image: gitea.xkkxyy.com/Kai/my-django:latest
|
||||||
|
command: ["uvicorn", "mysite.asgi:application", "--host=0.0.0.0", "--port=80", "--reload"]
|
||||||
|
deploy:
|
||||||
|
mode: replicated
|
||||||
|
replicas: 1
|
||||||
|
environment:
|
||||||
|
env: test
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- /opt/docker/data:/tmp/data
|
||||||
@ -1,3 +1,4 @@
|
|||||||
|
uvicorn
|
||||||
Django~=5.1.5
|
Django~=5.1.5
|
||||||
djangorestframework~=3.15.2
|
djangorestframework~=3.15.2
|
||||||
django-filter~=25.1
|
django-filter~=25.1
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user