forked from juliarizza/helpdeskbot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
41 lines (37 loc) · 1.39 KB
/
docker-compose.yml
File metadata and controls
41 lines (37 loc) · 1.39 KB
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
# docker-compose.yml
services:
# The Helpdesk Bot Service
bot:
# 'build: .' tells Docker Compose to build the image from the Dockerfile
# in the current directory.
build: .
# 'restart: always' ensures the bot container will automatically restart
# if it crashes, making our setup more resilient.
restart: always
# 'env_file' loads environment variables from a .env file.
# This is the standard way to handle secrets and configuration.
env_file:
- .env
# 'depends_on' tells Docker Compose to start the 'redis' service
# before starting the 'bot' service.
depends_on:
- redis
# The Redis Service
redis:
# We use the official Redis image from Docker Hub.
# 'alpine' is a very lightweight version.
image: "redis:6-alpine"
# 'restart: always' for the same resilience reasons.
restart: always
# We expose the Redis port only to the internal Docker network,
# not to the host machine, for better security. The 'bot' container
# can reach it using the service name 'redis'.
# This line maps the named volume 'redis-data' to the '/data'
# directory inside the Redis container. This is where Redis is
# configured to store its persistence files (dump.rdb).
volumes:
- redis-data:/data
# This top-level block declares the named volume. Docker will
# manage its creation and lifecycle.
volumes:
redis-data: