diff --git a/.woodpecker.yml b/.woodpecker.yml index b50928f..b2dcb8f 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -18,7 +18,7 @@ steps: image: docker:latest commands: - echo "$ENV_FILE" > .env - - sh run.sh + - docker compose up -d volumes: - /var/run/docker.sock:/var/run/docker.sock environment: diff --git a/docker-compose.yml b/docker-compose.yml index 516242d..6ccb38e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,21 +1,22 @@ services: bot: image: nwxraybot:latest - deploy: - replicas: 1 - restart_policy: - condition: on-failure + restart: always + container_name: nwxraybot_bot + build: + context: . + dockerfile: Dockerfile networks: - bot_network depends_on: - - db + db: + condition: service_healthy + restart: true db: image: postgres:17-alpine - deploy: - replicas: 1 - restart_policy: - condition: on-failure + container_name: nwxraybot_db + restart: always environment: POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres} POSTGRES_USER: ${POSTGRES_USER:-postgres} @@ -35,7 +36,6 @@ services: networks: bot_network: - driver: overlay volumes: postgres_data: \ No newline at end of file diff --git a/nwxraybot/config.py b/nwxraybot/config.py index 1b8c4ef..001a843 100644 --- a/nwxraybot/config.py +++ b/nwxraybot/config.py @@ -1,5 +1,5 @@ from pydantic import Field, SecretStr -from pydantic_settings import BaseSettings +from pydantic_settings import BaseSettings, SettingsConfigDict class Settings(BaseSettings): @@ -19,3 +19,4 @@ class Settings(BaseSettings): class Config: env_file = ".env" env_file_encoding = "utf-8" + extra = "allow"