-
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?
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: -
@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
-
@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?
-
D dan moved this topic from Q&A on
-
D 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