Feat: move from stack to compose
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2024-12-28 09:35:10 +03:00
parent 1f6ed3d09c
commit b909c77180
3 changed files with 13 additions and 12 deletions

View File

@@ -18,7 +18,7 @@ steps:
image: docker:latest image: docker:latest
commands: commands:
- echo "$ENV_FILE" > .env - echo "$ENV_FILE" > .env
- sh run.sh - docker compose up -d
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
environment: environment:

View File

@@ -1,21 +1,22 @@
services: services:
bot: bot:
image: nwxraybot:latest image: nwxraybot:latest
deploy: restart: always
replicas: 1 container_name: nwxraybot_bot
restart_policy: build:
condition: on-failure context: .
dockerfile: Dockerfile
networks: networks:
- bot_network - bot_network
depends_on: depends_on:
- db db:
condition: service_healthy
restart: true
db: db:
image: postgres:17-alpine image: postgres:17-alpine
deploy: container_name: nwxraybot_db
replicas: 1 restart: always
restart_policy:
condition: on-failure
environment: environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
POSTGRES_USER: ${POSTGRES_USER:-postgres} POSTGRES_USER: ${POSTGRES_USER:-postgres}
@@ -35,7 +36,6 @@ services:
networks: networks:
bot_network: bot_network:
driver: overlay
volumes: volumes:
postgres_data: postgres_data:

View File

@@ -1,5 +1,5 @@
from pydantic import Field, SecretStr from pydantic import Field, SecretStr
from pydantic_settings import BaseSettings from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings): class Settings(BaseSettings):
@@ -19,3 +19,4 @@ class Settings(BaseSettings):
class Config: class Config:
env_file = ".env" env_file = ".env"
env_file_encoding = "utf-8" env_file_encoding = "utf-8"
extra = "allow"