This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
name: Deploy App
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
- name: Deploy to Server
|
||||
run: |
|
||||
APP_DIR="/opt/aicds/apps/${GITHUB_REPOSITORY#*/}"
|
||||
mkdir -p $APP_DIR
|
||||
cp -a . $APP_DIR/
|
||||
cd $APP_DIR
|
||||
docker compose down || true
|
||||
docker compose up -d --build
|
||||
docker image prune -f
|
||||
@@ -0,0 +1,3 @@
|
||||
.claude/
|
||||
__pycache__/
|
||||
*.pyc
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
FROM python:3.11-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN pip install --no-cache-dir fastapi uvicorn[standard]
|
||||
|
||||
COPY main.py .
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
@@ -0,0 +1,13 @@
|
||||
services:
|
||||
app:
|
||||
build: .
|
||||
networks:
|
||||
- agent-net
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.hellotest.rule=Host(`hello-test.aicds.ch`)"
|
||||
- "traefik.http.routers.hellotest.entrypoints=websecure"
|
||||
- "traefik.http.routers.hellotest.tls.certresolver=myresolver"
|
||||
networks:
|
||||
agent-net:
|
||||
external: true
|
||||
Reference in New Issue
Block a user