-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
36 lines (33 loc) · 931 Bytes
/
docker-compose.yml
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
version: '3.5'
services:
bot:
build:
context: .
dockerfile: Dockerfile
container_name: aiogram-bot
restart: on-failure
stdin_open: true
volumes:
- ./src:/app
depends_on:
- postgres
environment:
API_TOKEN: ${API_TOKEN}
POSTGRES_HOST: postgres
POSTGRES_PORT: ${POSTGRES_PORT}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
postgres:
image: postgres:12-alpine
restart: on-failure
ports:
- "5432:5432"
volumes:
- ./postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
postgres-data: