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

Improve documentation on attaching MySQL database #242

Open
Fleker opened this issue Feb 9, 2024 · 1 comment
Open

Improve documentation on attaching MySQL database #242

Fleker opened this issue Feb 9, 2024 · 1 comment

Comments

@Fleker
Copy link

Fleker commented Feb 9, 2024

Hey folks,
I am have been working towards setting up a local instance of Friendica and I had hoped the Docker container would be a good way to quickly bootstrap something usable. However, I have found myself stalled amidst several setup issues and I have been having difficulty understanding the documentation.

In particular, I have been able to load the Friendica installer on localhost and get to the DB page. However, I am stuck as I can't seem to connect to my database.
image

I've created a docker-compose.yml which I can start up and it does show both services running and I can access them via Docker. However, they don't seem to talk to each other. I have tried alternatively using MariaDB v MySQL and either way it gives me that error. In addition, I have looked at the logs in both services without spotting any obvious errors.

I'm using a local image to get around #241.

version: "2"
# See https://hub.docker.com/_/friendica
services:
  friendica:
    image: friendica-beantown1
    depends_on:
      - db
    ports:
      - "8080:80"
    volumes:
      - friendica:/var/www/html
    environment: 
      - MYSQL_HOST=db
      - MYSQL_USER=friendica
      - MYSQL_PASSWORD=
      - MYSQL_DATABASE=friendica
  db:
    image: mariadb:latest  # Or mysql:latest
    # image: mysql:latest  # Or mysql:latest
    restart: always
    volumes:
      - db:/var/lib/mysql
    environment:
      - MYSQL_USER=friendica
      - MYSQL_PASSWORD=
      - MYSQL_DATABASE=friendica
      - MYSQL_RANDOM_ROOT_PASSWORD=no

volumes:
  db: {}
  friendica: {}

It'd be great if I'm missing something simple, but efforts to improve the setup docs may generally be helpful.

@nupplaphil
Copy link
Collaborator

nupplaphil commented Mar 1, 2024

@Fleker

why do you use beantowndb as DB servername? it should be db (as set in the docker-compose.yml). Same goes to the DB username (friendica instead of root).

For a quick setup, use the auto-installer feature, described here: https://github.com/friendica/docker?tab=readme-ov-file#automatic-installation

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

No branches or pull requests

2 participants