Skip to content

Commit

Permalink
docker: implement postgres and volumes (TgCatUB#332)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jisan09 authored May 6, 2023
2 parents 206d190 + ad6768b commit 1fc2bd7
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 1fc2bd7

Please sign in to comment.