.env shenanigans
Some checks failed
Build and Deploy Backend / Run Linters and Tests (push) Failing after 8s
Build and Deploy Backend / Build and Deploy (push) Has been skipped

This commit is contained in:
c-d-p
2025-05-01 00:06:13 +02:00
parent b8c306721a
commit 5e822da407
5 changed files with 8 additions and 12 deletions

View File

@@ -10,7 +10,7 @@ on:
paths: # Only run if backend code or Docker config changes
- 'backend/**'
- '.gitea/workflows/deploy.yml'
- 'backend/docker-compose.yml'
- 'backend/docker-compose.deploy.yml'
# Allows running of this workflow manually from the Actions tab
workflow_dispatch:
@@ -123,14 +123,10 @@ jobs:
run: |
#!/bin/bash -ex
# Define path to compose file WITHIN the checked-out workspace
COMPOSE_FILE="${{ gitea.workspace }}/backend/docker-compose.deploy.yml"
PROJECT_NAME="maia"
# Create env file for docker compose
cp "${{ gitea.workspace }}/backend/.env.deploy" "${{ gitea.workspace }}/backend/.env"
echo "--- Start Deploy Locally (using compose file from repo) ---"
echo "Workspace root: ${{ gitea.workspace }}"
echo "Using compose file: ${COMPOSE_FILE}"

View File

@@ -2,7 +2,7 @@
from pydantic_settings import BaseSettings
import os
DOTENV_PATH = os.path.join(os.path.dirname(__file__), "../.env")
DOTENV_PATH = os.path.join(os.path.dirname(__file__), "../.env.local")
class Settings(BaseSettings):

View File

@@ -13,7 +13,7 @@ services:
networks:
- default
env_file:
- ./.env
- ./.env.deploy
labels:
- "traefik.enable=true"
- "traefik.http.routers.maia.rule=Host(`maia.depaoli.id.au`)"
@@ -33,7 +33,7 @@ services:
- db
- redis
env_file:
- ./.env
- ./.env.deploy
networks:
- default
@@ -48,7 +48,7 @@ services:
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
env_file:
- ./.env
- ./.env.deploy
networks:
- default
restart: unless-stopped

View File

@@ -21,7 +21,7 @@ services:
networks:
- maia_network
env_file:
- ./.env
- ./.env.local
restart: unless-stopped
# ----- Celery Worker -----
@@ -37,7 +37,7 @@ services:
- db
- redis
env_file:
- ./.env
- ./.env.local
networks:
- maia_network
restart: unless-stopped
@@ -53,7 +53,7 @@ services:
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
env_file:
- ./.env
- ./.env.local
networks:
- maia_network
restart: unless-stopped