-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
36 lines (33 loc) · 965 Bytes
/
docker-compose.yml
File metadata and controls
36 lines (33 loc) · 965 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
services:
redis:
image: "redis:7-alpine"
container_name: transcoder-redis
ports:
- "6379:6379"
volumes:
- redis-data:/data
restart: always
# The Go transcoder application service
transcoder:
container_name: transcoder-app
# Build the Docker image from the Dockerfile in the current directory
build: .
# Load environment variables from the .env file
env_file:
- .env
# Ensure that the 'redis' service is started before this service
depends_on:
- redis
# Map the output directory from the container to a local 'output' folder
# This lets you easily access the transcoded video files on your machine.
volumes:
- ./output:/tmp/transcodes
- ./local_videos:/samples
# Restart the service if it fails
restart: on-failure
# Expose the metrics port
ports:
- "8080:8080"
# Define the named volume for Redis data persistence
volumes:
redis-data: