diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index ea64836f..70260ebe 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,4 +1,16 @@ -FROM squidfunk/mkdocs-material +FROM python:3.14-alpine -# Optional: Install additional tools if needed -# RUN apk add --no-cache \ No newline at end of file +# Install uv +COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv + +# Set working directory +WORKDIR /workspaces/mkdocs-wiki + +# Copy project files +COPY requirements.txt pyproject.toml* uv.lock* ./ + +# Install git +RUN apk add --no-cache git + +# Install dependencies with uv +RUN uv pip install --system -r requirements.txt \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index f4b1302f..5e3634a1 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,13 +2,13 @@ "name": "MkDocs DevContainer", "build": { "dockerfile": "Dockerfile", - "context": "." + "context": ".." }, "runArgs": ["--init"], "settings": {}, "extensions": [], "forwardPorts": [8000], - "postCreateCommand": "mkdocs serve -a 0.0.0.0:8000", + "postCreateCommand": "uv pip install --system -r requirements.txt && mkdocs serve -a 0.0.0.0:8000", "mounts": [ "source=${localWorkspaceFolder},target=/docs,type=bind" ] diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index ed0dde99..d4f9974e 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -16,10 +16,15 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.13' # Specifying the Python version we want to use - # cache: 'pip' # caching pip dependencies + python-version: '3.14' # Specifying the Python version we want to use + + - name: Install uv + uses: astral-sh/setup-uv@v5 + with: + enable-cache: true + - name: Install dependencies - run: pip install -r requirements.txt + run: uv pip install --system -r requirements.txt - name: build Website run: mkdocs build @@ -39,25 +44,26 @@ jobs: dockerfile: Dockerfile tags: gitea.rwcloud.ch/homelab/wiki:latest - deploy: - needs: build-and-push - runs-on: ubuntu-latest - steps: - - name: executing remote ssh commands using ssh key - uses: appleboy/ssh-action@v1.2.0 - with: - host: ${{ secrets.SSH_HOST }} - username: ${{ secrets.SSH_USERNAME }} - key: ${{ secrets.SSH_KEY }} - port: ${{ secrets.SSH_PORT }} - script: | - cd ~/ansible - git pull - source ./.venv/bin/activate - pip install -r requirements.txt - ansible-playbook -i inventory/hosts.yml --vault-password-file ./.vault_pass playbooks/proxmox/deploy_docker_services.yml --tags oauth2-wiki,wiki-uninstall - ansible-playbook -i inventory/hosts.yml --vault-password-file ./.vault_pass playbooks/proxmox/deploy_docker_services.yml --tags oauth2-wiki,wiki-install - deactivate + # TODO: Deploy muss neu geschrieben werden + # deploy: + # needs: build-and-push + # runs-on: ubuntu-latest + # steps: + # - name: executing remote ssh commands using ssh key + # uses: appleboy/ssh-action@v1.2.0 + # with: + # host: ${{ secrets.SSH_HOST }} + # username: ${{ secrets.SSH_USERNAME }} + # key: ${{ secrets.SSH_KEY }} + # port: ${{ secrets.SSH_PORT }} + # script: | + # cd ~/ansible + # git pull + # source ./.venv/bin/activate + # pip install -r requirements.txt + # ansible-playbook -i inventory/hosts.yml --vault-password-file ./.vault_pass playbooks/proxmox/deploy_docker_services.yml --tags oauth2-wiki,wiki-uninstall + # ansible-playbook -i inventory/hosts.yml --vault-password-file ./.vault_pass playbooks/proxmox/deploy_docker_services.yml --tags oauth2-wiki,wiki-install + # deactivate diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 13566b81..00000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml deleted file mode 100644 index 105ce2da..00000000 --- a/.idea/inspectionProfiles/profiles_settings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/mkdocs-wiki.iml b/.idea/mkdocs-wiki.iml deleted file mode 100644 index 8b8c3954..00000000 --- a/.idea/mkdocs-wiki.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 8df1e178..00000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1ddf..00000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file