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

nextcloud: add apache container reachability check run-exec-commands.sh #5730

Merged
merged 6 commits into from
Dec 20, 2024

Conversation

JMarcosHP
Copy link
Contributor

Closes #5722

JMarcosHP and others added 2 commits December 9, 2024 19:26
@szaimen szaimen added 3. to review Waiting for reviews enhancement New feature or request labels Dec 10, 2024
@szaimen szaimen modified the milestones: next, v10.1.1 Dec 10, 2024
@JMarcosHP JMarcosHP changed the title Added domain reachability check and retry mechanism to run-exec-commands.sh Add domain reachability check and retry mechanism to run-exec-commands.sh Dec 16, 2024
@szaimen
Copy link
Collaborator

szaimen commented Dec 17, 2024

Hey, thanks a lot for the PR! :)

However I would prefer a solution where we wait for the apache container to be available and then run the command directly.
Do you think you can implement this?

@szaimen szaimen added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Dec 17, 2024
@JMarcosHP
Copy link
Contributor Author

JMarcosHP commented Dec 17, 2024

Hey, thanks a lot for the PR! :)

However I would prefer a solution where we wait for the apache container to be available and then run the command directly. Do you think you can implement this?

Sure! We can do this, but we need to add 2 environment variables to the nextcloud container, $APACHE_HOST and $APACHE_PORT to get it working instead of $NC_DOMAIN

@JMarcosHP
Copy link
Contributor Author

JMarcosHP commented Dec 17, 2024

Currently we only have $APACHE_PORT inside the container. I don't know where the nextcloud container gets these values or how to add the $APACHE_HOST env variable to get it working.

1ec2eea84ebf:/var/www/html# printenv | grep APACHE
APACHE_PORT=11000

Edit: I figured how to add it, in the containers.json file.

…vor of apache container host.

Signed-off-by: JMarcosHP <[email protected]>
@JMarcosHP JMarcosHP changed the title Add domain reachability check and retry mechanism to run-exec-commands.sh Add apache container reachability check and retry mechanism to run-exec-commands.sh Dec 17, 2024
@JMarcosHP
Copy link
Contributor Author

It works:

Captura desde 2024-12-17 11-09-40

@JMarcosHP
Copy link
Contributor Author

Now if the apache container is not running or is not ready the script will wait until is ready.

Captura desde 2024-12-17 11-18-18

@szaimen szaimen added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Dec 18, 2024
Copy link
Collaborator

@szaimen szaimen left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @JMarcosHP! 😊

@szaimen szaimen merged commit 4379446 into nextcloud:main Dec 20, 2024
9 checks passed
@szaimen szaimen changed the title Add apache container reachability check and retry mechanism to run-exec-commands.sh nextcloud: add apache container reachability check run-exec-commands.sh Dec 20, 2024
@szaimen
Copy link
Collaborator

szaimen commented Dec 20, 2024

This is now released with v10.2.0 Beta. Testing and feedback is welcome! See https://github.com/nextcloud/all-in-one#how-to-switch-the-channel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Onlyoffice container not working propertly after restart.
2 participants