mirror of
https://github.com/kevinveenbirkenbach/homepage.veen.world.git
synced 2025-09-09 19:27:11 +02:00
Added port via env
This commit is contained in:
11
Dockerfile
11
Dockerfile
@@ -11,8 +11,11 @@ RUN pip install --no-cache-dir -r requirements.txt
|
||||
# Copy application code
|
||||
COPY app/ .
|
||||
|
||||
# Expose port
|
||||
EXPOSE 5000
|
||||
# Set default port environment variable
|
||||
ENV PORT=5000
|
||||
|
||||
# Start command
|
||||
CMD ["python", "app.py"]
|
||||
# Expose port (optional for documentation)
|
||||
EXPOSE ${PORT}
|
||||
|
||||
# Start command using shell to allow env substitution
|
||||
CMD ["sh", "-c", "exec python app.py --port=${PORT}"]
|
||||
|
Reference in New Issue
Block a user