refactor(docker): use environment variables instead of hardcoded CMD args
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Replace hardcoded CMD arguments with ENV directives: - AETHERA_LISTEN=0.0.0.0 - AETHERA_PORT=8080 - AETHERA_DATA_DIR=/app/data This allows runtime configuration via docker run -e or compose files.
This commit is contained in:
@@ -61,8 +61,10 @@ RUN mkdir -p /app/data
|
||||
# Expose the default port
|
||||
EXPOSE 8080
|
||||
|
||||
# Set environment variable defaults
|
||||
ENV AETHERA_LISTEN=0.0.0.0
|
||||
ENV AETHERA_PORT=8080
|
||||
ENV AETHERA_DATA_DIR=/app/data
|
||||
|
||||
# Set the entrypoint
|
||||
ENTRYPOINT ["./aethera"]
|
||||
|
||||
# Default command with recommended production settings
|
||||
CMD ["--listen", "0.0.0.0", "--port", "8080", "--data-dir", "/app/data"]
|
||||
|
||||
Reference in New Issue
Block a user