version: '3.8' services: vk_bot: build: . environment: GROUP_ID: "group_id" ACCESS_TOKEN: "access_token" DATABASE_URL: "postgresql://postgres:password@db:5432/vkbot" depends_on: - db restart: unless-stopped api: build: context: . dockerfile: Dockerfile.api environment: DATABASE_URL: "postgresql://postgres:password@db:5432/vkbot" ports: - "8000:8000" depends_on: - db restart: unless-stopped db: image: postgres:15 environment: POSTGRES_USER: "postgres" POSTGRES_PASSWORD: "password" POSTGRES_DB: "vkbot" volumes: - db_data:/var/lib/postgresql/data restart: always volumes: db_data: