-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
68 lines (64 loc) · 1.56 KB
/
docker-compose.yaml
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
services:
bot:
container_name: get_anime_bot.bot
restart: "unless-stopped"
env_file:
- ".env"
build:
context: .
dockerfile: "Dockerfile"
networks:
- get_anime_bot.postgres.network
logging:
options:
max-size: "100m"
depends_on:
postgres:
condition: service_healthy
profiles: ["prod"]
bot-dev:
container_name: get_anime_bot.bot.dev
restart: "unless-stopped"
env_file:
- ".env"
build:
context: .
dockerfile: "Dockerfile.dev"
networks:
- get_anime_bot.postgres.network
depends_on:
postgres:
condition: service_healthy
profiles: ["dev"]
postgres:
container_name: get_anime_bot.postgres
image: "postgres:15-alpine"
hostname: get_anime_bot.postgres
restart: "unless-stopped"
expose:
- "5432"
ports:
- "127.0.0.1:${POSTGRES_PORT:-5432}:5432"
networks:
- get_anime_bot.postgres.network
# extra_hosts:
# - "host.docker.internal:host-gateway"
environment:
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
POSTGRES_USER: ${POSTGRES_USER:-$USER}
POSTGRES_DB: ${POSTGRES_DB:-$USER}
volumes:
- get_anime_bot.postgres.data:/var/lib/postgresql/users:rw
logging:
options:
max-size: "50m"
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
interval: 10s
timeout: 60s
retries: 5
start_period: 10s
volumes:
get_anime_bot.postgres.data: {}
networks:
get_anime_bot.postgres.network: {}