diff --git a/docker-compose.yml b/docker-compose.yml index f2ce5c2d5c..90181e2db9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,11 +10,32 @@ version: '3.3' services: - app: + app: container_name: cat build: context: . dockerfile: Dockerfile - network_mode: "host" command: python3 -m userbot restart: on-failure + environment: + - DATABASE_URL=postgresql://postgres:postgres@db/catuserbot + depends_on: + - db + volumes: + - botdata:/userbot + + db: + image: postgres + restart: always + environment: + - POSTGRES_USER=postgres + - POSTGRES_PASSWORD=postgres + - POSTGRES_DB=catuserbot + volumes: + - db:/var/lib/postgresql/data +volumes: + db: + driver: local + botdata: + driver: local +