FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    Fusion Auth w/ Vitess DB

    Scheduled Pinned Locked Moved Unsolved Q&A
    3 Posts 2 Posters 7.1k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      psmiddy
      last edited by

      Hi there,

      I am trying to get fusion auth running in docker. I am using the MySQL setting and trying to connect it to a Vitess cluster. I am in maintenance mode and it doesn't accept the Vitess details. Has anyone got this working?

      https://vitess.io/

      Thanks

      Paul

      Here is my docker-compose.yml file:

      version: '3'
      services:
          vitess-test-8_0:
              image: vitess/vttestserver:mysql80@sha256:5fec546e3f2ba50237b78938982a72bf17eacbc97f18ab877774f22d6e2e9682
              restart: always
              ports:
                  - 5421:33807
              environment:
                  PORT: 33804
                  KEYSPACES: 'test'
                  NUM_SHARDS: '1'
                  MYSQL_BIND_HOST: '0.0.0.0'
                  FOREIGN_KEY_MODE: 'disallow'
                  MYSQL_ROOT_PASSWORD: prisma
                  MYSQL_DATABASE: global-person
                  MYSQL_USER: prisma
                  MYSQL_PASSWORD: prisma
      
          vitess-shadow-8_0:
              image: vitess/vttestserver:mysql80@sha256:5fec546e3f2ba50237b78938982a72bf17eacbc97f18ab877774f22d6e2e9682
              restart: always
              ports:
                  - 5422:33807
              environment:
                  PORT: 33804
                  KEYSPACES: 'shadow'
                  NUM_SHARDS: '1'
                  MYSQL_BIND_HOST: '0.0.0.0'
                  FOREIGN_KEY_MODE: 'disallow'
                  MYSQL_ROOT_PASSWORD: prisma
                  MYSQL_DATABASE: global-person
                  MYSQL_USER: prisma
                  MYSQL_PASSWORD: prisma
      
          fusionauth:
              image: fusionauth/fusionauth-app:latest
              depends_on:
                  - vitess-test-8_0
              environment:
                  DATABASE_URL: jdbc:mysql://localhost:5421/fusionauth
                  database.root.username: prisma
                  DATABASE_ROOT_PASSWORD: prisma
                  database.username: prisma
                  DATABASE_PASSWORD: prisma
                  FUSIONAUTH_APP_MEMORY: 500M
                  search.type: database
                  fusionauth-app.url: http://fusionauth:9011
                  FUSIONAUTH_APP_SILENT_MODE: 'false'
              restart: unless-stopped
              ports:
                  - 9011:9011
              volumes:
                  - fa_config:/usr/local/fusionauth/config
      
      volumes:
          fa_config:
      
      M 1 Reply Last reply
      Reply Quote 0
      • M
        maciej.wisniowski Power User @psmiddy
        last edited by

        @psmiddy I've never heard about vitess but seems that your DATABASE_URL should point to vitess-test-8_0 not to localhost. Also, I think the port number can be just 33807 as it should be available internally in docker (ports: directive just publishes specific ports to localhost, eg. if you need to connect to docker from your desktop). Try:

        DATABASE_URL: jdbc:mysql://vitess-test-8_0:33807/fusionauth

        P 1 Reply Last reply
        Reply Quote 1
        • P
          psmiddy @maciej.wisniowski
          last edited by

          @maciej-wisniowski Thanks for your help. I was able to connect but had some trouble from then on. I will create an issue on github and see if official support can be added.

          Is there a recommended way of running fusion auth on a clustered database?

          1 Reply Last reply
          Reply Quote 0
          • danD dan moved this topic from Q&A on
          • danD dan moved this topic from Frequently Asked Questions (FAQ) on

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post