-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
44 lines (34 loc) · 929 Bytes
/
docker-compose.yml
File metadata and controls
44 lines (34 loc) · 929 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
43
44
version: '3.9'
services:
telegram_bot_docker_tmpl:
container_name: TelegramBotDockerTmpl
image: telegram_bot_docker_tmpl
build: .
environment:
- BOT_TOKEN=${BOT_TOKEN}
ports:
- "443:443"
volumes:
- ./logs:/~/TelegramBotDockerTmpl/logs
restart: on-failure
volumes:
logs:
# -------------------------------
# Create and start container:
# $ export BOT_TOKEN=<BOT_TOKEN>
# $ docker-compose up -d
# -------------------------------
# Stop lifted containers:
# $ docker-compose stop
# -------------------------------
# Start stopped containers
# $ docker-compose start
# -------------------------------
# Stop and delete containers and network:
# $ docker-compose down
# -------------------------------
# Remove image:
# $ docker rmi telegram_bot_docker_tmpl
# -------------------------------
# Clear logs:
# $ sudo rm -rf logs/*