A production ready example Phoenix app that's using Docker and Docker Compose.
The example Phoenix + Docker app serves as an insightful starting point for developers looking to either create a new project or Dockerize an existing Phoenix application. Despite being archived, it remains a relevant resource for understanding the integration of Phoenix with Docker best practices gleaned from years of experience. The application is minimal yet effectively demonstrates essential components that can be utilized in real-world scenarios without overwhelming users with unnecessary complexities.
At its core, this app showcases the tech stack including Phoenix 1.8.0 and Elixir 1.18.4, and is designed to help newcomers and seasoned developers alike understand the intricacies of Dockerizing a Phoenix application. It offers a structured guide to setting up a development environment that adheres to established best practices.
Minimal Setup: The app is intentionally lightweight, providing just enough structure to illustrate the integration of Phoenix with Docker without extraneous details.
Tech Stack Flexibility: Utilizing PostgreSQL for the back-end and esbuild, TailwindCSS, and Heroicons for the front-end allows for a versatile project foundation that can be tailored to various needs.
Automated Configuration: The multi-stage Dockerfile streamlines the process of building and running the server based on the set environment, simplifying deployment.
Static Analysis Integration: Tools like credo and excoveralls promote code consistency and thorough testing coverage, ensuring robust application development.
Environment Variable Management: Configuration settings are extracted into environment variables, which enhances security and flexibility, making the app adaptable to different environments.
Health Check Endpoints: The inclusion of health check related actions in the controllers ensures that applications maintain operability and can be monitored easily.
Changeable Opinions: The flexible architecture allows developers to swap out components according to their preferences, particularly in selecting JavaScript libraries for their specific applications.
This example app provides a solid foundation for developers interested in embracing modern web development practices while harnessing the capabilities of both Phoenix and Docker.