Menu

[8e5d39]: / docker-compose.yml  Maximize  Restore  History

Download this file

23 lines (19 with data), 746 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
version: '3.8'
services:
app:
build: .
ports:
- "8000:8000"
# command: supervisord # This is already handled by the Dockerfile CMD
volumes:
# Optional: Uncomment the line below to mount your local code for development
# - .:/app
environment:
# Example 1: Directly set an environment variable
- MY_VARIABLE=my_value
# Example 2: Reference an environment variable from the host machine
# - ANOTHER_VARIABLE=${HOST_VARIABLE}
# Example 3: Reference an environment variable from a .env file (create a .env file in the same directory)
# - DB_HOST=${DB_HOST}
# Example 4: Set a default value if the variable is not found
# - API_KEY=${API_KEY:-default_api_key}