Skip to content
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

Convert to docker #1

Closed
wants to merge 24 commits into from
Closed

Convert to docker #1

wants to merge 24 commits into from

Conversation

212223
Copy link
Contributor

@212223 212223 commented Mar 21, 2022

Application conversion to docker-compose project. Manual creation in ./README.md and ./docker/service/README.md

app/default/.elasticsearch-http-requests/init.sh Outdated Show resolved Hide resolved
@@ -0,0 +1,84 @@
#!/bin/sh
Copy link
Owner

Choose a reason for hiding this comment

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

@212223 why this directory move from app to app/default here and in lots of places? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is good to have a web application served by nginx from a sub-directory app/default instead of a parent directory app because this allows to switch between applications instantaneously.

For example instead of having your application inside the app/default dir you may have it in app/bar dir and a symlink app/default -> app/bar that points to the dir of the application you want to serve. Demo commit.

Then if you want to change the application you serve you don't need to reconfigure nginx nor restarting any of the services is required but only changing the symlink target, for example:

cd app
unlink default
ln -sr foo default

like in the Demo commit

and you are ready to serve the new application.
Example use cases:

  • Live update of an application
  • Rollback to previous version of an app in case of troubles.
  • Presenting different applications or the same in different versions during a time constrained presentation.
  • Fallback to an application that helps debugging problems.
  • Creating a new version of an app just by copying it to a new dir and symlink to it.

Currently the web app is in the app/default dir. Would you like me to:

  1. Leave it as it is
  2. Move it to a different dir and create a symlink default that points to that dir
  3. Move that application to app dir from app/default and reconfigure docker-compose?

app/default/src/Controller/DefaultController.php Outdated Show resolved Hide resolved
app/default/src/Elasticsearch/Repository/CarRepository.php Outdated Show resolved Hide resolved
app/default/src/Elasticsearch/Service/ApiClient.php Outdated Show resolved Hide resolved
app/default/src/ValueObject/PagesTotal.php Outdated Show resolved Hide resolved
docker/service/docker-compose.yaml Outdated Show resolved Hide resolved
docker/service/nginx-v1/image/files/etc/nginx/koi-utf Outdated Show resolved Hide resolved
@lrynek lrynek closed this Feb 9, 2023
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.

3 participants