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

Add more friendly entry into SimplyCode Docker for new users. #7

Merged
merged 1 commit into from
May 26, 2023

Conversation

Potherca
Copy link
Member

@Potherca Potherca commented May 22, 2023

This MR adds a few changes to make it easier for new users to understand what is going on.

First of all, the /var/www/www/api/data/generated.html file missing is not an error, but a warning.

In case it is missing the /simplycode path is added to the URL shown in the docker output.

Secondly, a custom 403 handler is added.

If the path is / and /var/www/www/api/data/generated.html is missing, a custom message is shown which directs the user to /simplycode.

This code is a fisrt working draft, and can be improved upon later.

Finally, the contents of /var/www/www/api/data are now always shown, both in the docker output and on the 403 page.

This should make it easier to debug what is going on in case of the wrong directory being mounted into the docker container.

These changes can be tested using:

docker pull ghcr.io/simplyedit/simplycode-docker:7_merge
docker run -it --rm --env "USER_ID=$(id -u)" --env "USER_GID=$(id -g)" --volume "${PWD}:/var/www/www/api/data" ghcr.io/simplyedit/simplycode-docker:7_merge

Leave out the --volume to emulate a clean install by a new user.

@Potherca Potherca requested a review from poef May 22, 2023 14:45
@Potherca Potherca self-assigned this May 22, 2023
@Potherca Potherca added this to the v0.5.0 milestone May 22, 2023
@poef poef merged commit 48aac01 into main May 26, 2023
1 check passed
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.

None yet

2 participants