Giter Club home page Giter Club logo

Comments (5)

fief-bailiff avatar fief-bailiff commented on May 22, 2024 1

Hail, @MattiaFailla 👋 Welcome to Fief's kingdom!

Our team will get back to you very soon to help.

In the meantime, take a minute to star our repository ⭐️

star-fief

Farewell!

from fief.

fief-bailiff avatar fief-bailiff commented on May 22, 2024 1

Hail, @MattiaFailla 👋

I've noticed you shared secret values: SECRET, FIEF_CLIENT_ID, FIEF_CLIENT_SECRET, ENCRYPTION_KEY. Those are highly sensitive and you should keep them secret.

For your security, I've taken the liberty to replace them with dummy values.

from fief.

frankie567 avatar frankie567 commented on May 22, 2024 1

Thank you for those details!

So it turns out it works with MariaDB, but not MySQL (🙄). I've added it to our CI so we can catch those errors earlier.

The culprit is actually an index on the message column of the AuditLog model. It's a TEXT column, so it's indeed a bit weird to have an index on this, don't really know why I did this.

I'll push a fix soon!

from fief.

frankie567 avatar frankie567 commented on May 22, 2024

Hello @MattiaFailla 👋

Hmm, that's indeed an error during the creation of the database schema. It's strange because Fief is tested against MySQL during CI.

Could you tell me which version of MySQL you are using?

from fief.

MattiaFailla avatar MattiaFailla commented on May 22, 2024

Hey @frankie567

I'm using MySQL Server 8.0.31-1.el8

Here is the docker-compose file:
(Please note that I've specified the 0.18 Fief-server version just for testing but this issue is present in every Fief version.)

version: '3'

services:
  db:
    image: mysql
    ports:
      - "0.0.0.0:3308:3306"
    env_file:
      - .env

  fief-server:
    image: ghcr.io/fief-dev/fief:0.18
    command: fief run-server --port 8585
    depends_on:
      - db
    expose:
      - 8585
    env_file:
      - .env

  fief-worker:
    image: ghcr.io/fief-dev/fief:latest
    command: fief run-worker -p 1 -t 1
    env_file:
      - .env

  redis:
    image: redis:alpine
    command: redis-server --save 60 1 --loglevel warning
    volumes:
      - redis-data:/data

volumes:
  redis-data:

And this is the .env

DEBUG=True
MYSQL_DATABASE=fastapi
MYSQL_ROOT_PASSWORD=root

# Reference: https://docs.fief.dev/self-hosting/environment-variables/

SECRET=XXX
FIEF_CLIENT_ID=XXX
FIEF_CLIENT_SECRET=XXX
ENCRYPTION_KEY=XXX=
PORT=8000
ROOT_DOMAIN=localhost:8000
FIEF_DOMAIN=localhost:8000
[email protected]
FIEF_MAIN_USER_PASSWORD=exampleexample
CSRF_COOKIE_SECURE=False
LOGIN_SESSION_COOKIE_SECURE=False
SESSION_COOKIE_SECURE=False
FIEF_ADMIN_SESSION_COOKIE_SECURE=False


# Read more: https://docs.fief.dev/self-hosting/deployment/setup-database/
DATABASE_TYPE=MYSQL
DATABASE_HOST=db
DATABASE_PORT=3306
DATABASE_USERNAME=root
DATABASE_PASSWORD=root
DATABASE_NAME=fastapi

REDIS_URL=redis://redis:6379

LOGIN_SESSION_COOKIE_NAME=login_session_data
REGISTRATION_SESSION_COOKIE_NAME=registration_session_data

from fief.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.