Skip to content

fix: Docker Compose build#232

Merged
slowlydev merged 4 commits intoslowlydev:developfrom
gacanepa:bug/fix-docker-compose-build
Apr 17, 2025
Merged

fix: Docker Compose build#232
slowlydev merged 4 commits intoslowlydev:developfrom
gacanepa:bug/fix-docker-compose-build

Conversation

@gacanepa
Copy link
Copy Markdown
Contributor

Summary

This PR improves the Docker Compose configuration by properly implementing environment variable management and enhancing security through non-root user execution.

Changes Made

  • Removed hardcoded environment variables from compose.yaml
  • Added proper environment variable references using ${VARIABLE} syntax
  • Configured all services to run as non-root users (user: "1000:1000")
  • Updated compose.env.example with all required environment variables
  • Simplified the environment file configuration by removing redundant env_file directives

Motivation

  • Security: Running containers as non-root users reduces potential security risks
  • Configuration Management: Proper separation of configuration from code makes the application more maintainable and flexible
  • Environment Flexibility: Makes it easier to switch between different environments (dev, staging, prod) by using different environment files
  • Best Practices: Follows Docker and containerization best practices for configuration management

@gacanepa gacanepa requested a review from slowlydev as a code owner April 16, 2025 17:16
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 16, 2025

@gacanepa is attempting to deploy a commit to the f1-dash Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown
Owner

@slowlydev slowlydev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the PR, any good reason why we should enable backtrace in the example?
else it lgtm :)

@gacanepa
Copy link
Copy Markdown
Contributor Author

thanks for the PR, any good reason why we should enable backtrace in the example? else it lgtm :)

Hey, thank you for getting back to me so quickly! It is more of a personal preference based on this answer in a Rust forum. With that said, let me know if you want it removed.

@gacanepa gacanepa requested a review from slowlydev April 17, 2025 14:00
@slowlydev
Copy link
Copy Markdown
Owner

thanks for the PR, any good reason why we should enable backtrace in the example? else it lgtm :)

Hey, thank you for getting back to me so quickly! It is more of a personal preference based on this answer in a Rust forum. With that said, let me know if you want it removed.

thanks for the link, it seams fine for the most part, someone mentioned anyhow and how it might affect performance when backtrace is enabled so I would not enable it in a production env but maybe in a docker compose its fine.

But lets leave it as is for now.

@slowlydev slowlydev changed the base branch from main to develop April 17, 2025 20:12
Copy link
Copy Markdown
Owner

@slowlydev slowlydev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks lets ship it :shipit:

@slowlydev slowlydev merged commit 74efe5a into slowlydev:develop Apr 17, 2025
1 check failed
B-a-1-a pushed a commit to B-a-1-a/HypeRacing that referenced this pull request Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants