-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
42 lines (41 loc) · 870 Bytes
/
docker-compose.yaml
File metadata and controls
42 lines (41 loc) · 870 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
version: "3.9"
services:
postgres:
build:
context: ./
dockerfile: Dockerfile.postgress
environment:
POSTGRES_DB: root
POSTGRES_USER: root
POSTGRES_HOST_AUTH_METHOD: "trust"
PGDATA: "/var/lib/postgresql/data/pgdata"
volumes:
- postgres:/data/postgres
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
restart: unless-stopped
deploy:
resources:
limits:
cpus: '1'
memory: 4G
bot_app:
working_dir: /code
env_file:
- .env
command: uvicorn main:app --host 0.0.0.0 --port 80
build:
context: ./
volumes:
- ./:/code
depends_on:
- postgres
volumes:
postgres:
driver: local # is already local by default