friendica / friendica/docker

Docker Instructions fail to result in usable installation

Open
#134 12 comments 0 reactions 0 assignees View on GitHub
Bug
Dominant language
Shell
Stars
68
Forks
26
PR merge metrics
No merged PRs in 30d

Description

Three issues:

1. URL rewrite test fails
2. DB config is not pre-populated, despite being sent as environment variables
3. Trying to log in tries to redirect to HTTPS, which is not forwarded to the host.

# URL rewrite fails

When following the [Apache docker-compose](https://github.com/friendica/docker#base-version---apache) instructions verbatim, by creating a `docker-compose.yml` file with the contents specified in the README (the only change being to set MYSQL_PASSWORD), running `docker-compose up`, and browsing to http://localhost:8080, I receive the following error:

> Url rewrite in .htaccess is not working. Make sure you copied .htaccess-dist to .htaccess.
>
> Error message from Curl while fetching
> http://localhost:8080/install/testrewrite
>
> Failed to connect to localhost port 8080: Connection refused

This is due to the mismatch between port 80 on the Docker container being forward to port 8080 on the Docker host; when I change the `docker-compose.yml` to say `80:80` instead `8080:80`, the rewrite test passes and I can continue to logging in.

# DB config not pre-populated

I can see from the `docker-compose.yml` that the DB settings are stored in environment variables in the `app` container. These are not pre-populated during the DB setup stage. Is this expected?

# Failed HTTPS redirect

When creating an account (which understandably fails to send a confirmation email but shows a password via a toast notification), I try to log in with the username and password created, and the form tries to redirect the browser to submit via HTTPS, which is obviously the safe option, but fails because there's no forwarded port for HTTPS. I can confirm that if I use my browser's inspector and change the form's submit destination from `https` to `http`, I can log in successfully.

---

I'm not sure of the best ways to fix each of these issues unfortunately (but with some guidance I could give it a shot), but wanted to report them nonetheless.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Apache Docker instructions in the README and the referenced docker-compose.yml, then reproduce the installation at http://localhost:8080. Check the rewrite test at /install/testrewrite, the database setup environment variables, and the login redirect behavior. Done means a verbatim documented setup reaches a usable installation without manual port, database, or protocol changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose
Domain
devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.