-
Notifications
You must be signed in to change notification settings - Fork 10
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
build: create local dev environment that mirrors kube #1891
build: create local dev environment that mirrors kube #1891
Conversation
added ability to backup seeders first. added truncating and seeding of filament tables.
…-the-admin-interfaces' into feat/create-local-dev-environment-that-mirrors-kube
…-the-admin-interfaces' into feat/create-local-dev-environment-that-mirrors-kube
…-the-admin-interfaces' into feat/create-local-dev-environment-that-mirrors-kube
…we are able to handle attachment to other tables
README.md
Outdated
```bash | ||
docker run --rm --entrypoint '' platform.test php artisan key:generate --show | ||
``` |
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.
I'm not sure why but this image is actually called platform-platform.test
for me. So the above command other's that refer to the image name all fail. I'm not sure if this is a problem with the documentation here or something specific to my system, but I did prune out everything in docker and it still came up as I mentioned.
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.
I have fixed the command. I deleted all local images and volumes and stepped through each step to recreate and fixed all the instruction steps and commands.
|
||
For comprehensive instructions, consult the [Laravel documentation](https://laravel.com/docs/9.x). Here's an overview of how some key tasks can be carried out using your containers: | ||
|
||
- Visit the site using the SSL proxy to make sure assets load [https://localhost](https://localhost). |
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.
I wasn't able to load the site, just says unable to connect in the browser.
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.
I have added a section under Troubleshooting Cannot reach site using browser for some commands to try and figure out why it might not be running.
consolidate php extension installations to a single line, make npm available to run as other users
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.
Changes to the docker build. It will affect Kube container builds.
RUN docker-php-ext-install opcache | ||
RUN docker-php-ext-configure intl | ||
RUN docker-php-ext-install intl | ||
RUN docker-php-ext-install -j$(nproc) gd pdo_mysql mbstring exif pcntl bcmath bz2 zip soap intl opcache |
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.
Consolidated extensions to one line to speed up building container. Each time this command is run a build environment has to be created.
ENV NVM_VERSION 0.39.3 | ||
ENV NVM_DIR /root/.nvm | ||
ENV NVM_DIR /var/www/.nvm |
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.
Change install location for NVM so that it's available to other users.
@@ -1,9 +1,9 @@ | |||
FROM php:8.1-fpm | |||
|
|||
ENV PHP_VERSION 8.1 | |||
ENV NODE_VERSION 18 | |||
ENV NODE_VERSION 18.18.2 |
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.
Make the version more explicit so directory it's installed will be correctly added to $PATH.
```bash | ||
docker compose -f docker-compose.local.yml run --rm --entrypoint '' platform.test php artisan key:generate --show | ||
``` |
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.
@marvinroman, this step failed with dependency failed to start: container platform.redis exited (1)
From the Docker logs related to Redis:
2023-11-02 07:54:48 redis 11:54:48.67
2023-11-02 07:54:48 redis 11:54:48.67 Welcome to the Bitnami redis container
2023-11-02 07:54:48 redis 11:54:48.68 Subscribe to project updates by watching https://github.com/bitnami/containers
2023-11-02 07:54:48 redis 11:54:48.68 Submit issues and feature requests at https://github.com/bitnami/containers/issues
2023-11-02 07:54:48 redis 11:54:48.69
2023-11-02 07:54:48 redis 11:54:48.69 INFO ==> ** Starting Redis setup **
2023-11-02 07:54:48 redis 11:54:48.72 ERROR ==> The REDIS_PASSWORD environment variable is empty or not set. Set the environment variable ALLOW_EMPTY_PASSWORD=yes to allow the container to be started with blank passwords. This is recommended only for development.
I didn't see the App key generated either, but I suppose it may be because it didn't get that far.
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.
Added creating redis password to the instructions.
@marvinroman could you please look at the merge conflicts with this PR? I hope to find some more time to review this after the conflicts are addressed. |
@jobara I have merged in dev and resolved the conflict. |
Creates a local deployment that more closely mirrors Kube containers.
Creates a new docker-compose configuration that uses container builds for Kube.
Has some convenience features like setting user id to be identical to development environment allowing user to adjust files mounted into the containers without permission issues.
Included instructions on how to deploy.
Walked through instructions within README.md to make sure that it would create a working deployment.