-
-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a prod Dockerfile #1672
Add a prod Dockerfile #1672
Conversation
This commit introduces a `--yes` option to the `nntmux:install` command, allowing users to skip confirmation prompts for a streamlined installation process. It also improves messaging and error handling, particularly around locked installs, and removes unnecessary usage of `Str` helper methods. These changes enhance usability and code simplicity.
Created a reusable Blade component for the application logo. This addition provides a consistent and maintainable way to display the logo in views.
This commit introduces a Dockerized environment for the application, including a Dockerfile, docker-compose.yml, and a custom entrypoint script. The setup supports multiple services like MariaDB, Redis, and Elasticsearch, with health checks and environment configurations. It also automates dependency installation, environment setup, and Laravel-specific tasks like caching and installation processes.
Removed unnecessary packages, environment variables, and Sail-specific configurations. Replaced "sail" with "nntmux" for images, networks, and volumes. Simplified the setup by removing unused tests and redundant configurations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check my comments and do the changes.
I have also removed some extra libs @CicerBro was asking for |
Introduced a new `.env.dist` template to streamline environment variable management. Added Manticore service to the `docker-compose.yml` for enhanced database querying support. Updated `docker-entrypoint.sh` to use `envsubst` for environment substitution when generating `.env`.
Integrates Manticore search as a new service in the Docker Compose configuration. Configures ports, environment variables, resource limits, and volume mapping for Manticore. Ensures compatibility with the existing network and infrastructure.
It works well on my machine with this params : ELASTICSEARCH_LOGGING=true
ELASTICSEARCH_ENABLED=true
TEMP_UNRAR_PATH='/app/resources/tmp/unrar/'
TEMP_UNZIP_PATH='/app/resources/tmp/unzip/'
VIEW_COMPILED_PATH=/app/storage/framework/views
APP_TZ=Europe/Paris
APP_URL=localhost
SESSION_DOMAIN=null
MAIL_MAILER=smtp
MAIL_DRIVER=smtp
MAIL_HOST=mailpit
MAIL_PORT=1025
REDIS_HOST=redis
REDIS_PASSWORD=null
REDIS_PORT=6379
REDIS_CLIENT=phpredis
MANTICORESEARCH_HOST=manticore
ELASTICSEARCH_HOST=elasticsearch
DB_CONNECTION=mariadb
DB_HOST=mariadb
DB_URL=nnntmux
DB_PORT=3306
DB_USER=nntmuxMySQLusereee
DB_USERNAME=nntmuxMySQLuser
DB_DATABASE=nntmux
DB_PASSWORD=nntmuxMySQLpassword
DB_ROOTPASSWORD=nntmuxMySQLpassword
DB_NAME=nntmux
Oh and I've constated that the first characted of "DB_URL" is not interpreted, but it seems to be used instead of "DB_NAME" In the future we could update the .env.dist to add some default values |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tested all the changes and can confirm it works as it should?
Moved .env file creation logic to execute earlier in the script for better clarity and structure. Ensures .env is generated before running subsequent commands, improving maintainability.
Removed an unnecessary space in the schedule runner command. This change ensures consistency in formatting and avoids potential errors during script execution. No functional behavior is affected.
When you are 95% sure that you fixed issues, i will merge this PR, unless i find something that breaks the main code. Just let me know. |
This update ensures the Elasticsearch indexes are created and populated during container startup. It improves initial setup automation by running relevant Artisan commands to handle data indexing and predb population seamlessly.
Ok, just add a comment here that PR can be merged and i will merge it. |
You can merge :) |
We've discovered yesterday that the nzb's where not added inside the folder /storage/nzb. At first I though it was because the folder didn't exist since i'm mounting a volume inside it, but creating it doesn't seem to resolve the issue. I need a bit of time to investigate the issue, but if some of you know from where is could be coming, i'm all ears. PS : It could be related to theses errors :
or this one :
|
Introduced a conditional check in the entrypoint script to only clear caches if the install lock is missing and added logic to create necessary folder structures. Updated Laravel-specific post-installation steps to include extended permission settings. Enhanced the Dockerfile by including the Imagick PHP extension and updated `.dockerignore` to exclude additional storage directories.
Added .php-cs-fixer.cache to ignore list for better tooling support.
I wanted to push the logs in the stdout but i'll do that in another PR if it's ok. |
That's fine. |
Then the PR is ready, i'm testing it along side with a helm chart on my local server and it runs smoothly :D |
Resolve these conflicts after merging your previous PR and i will merge this one. |
I have an issue with permissions and web-app container does not start.
|
It seems to be more about a 80 port that is already used, try to use another port in APP_PORT |
Changed it to 8000 but container still tries to use 80. |
Actually its healthcheck that is failing. |
I'll do anotther MR, I've resolved it :) |
This PR adds a new Dockerfile that would be usefull to create production docker images.
The production docker image needs to have an adapted installing script & "php artisan optimize" command to work.