Deploy FusionAuth docker image to Fly.io
-
Hey, i docker image that was build upon
FusionAuth
docker image.The image works fine when i did
docker run ...
i can visit the app.I have deployed the image to to https://fly.io/ . from the logs the app running fine but when i tried visiting the url assign to the app nothing is loading.
Am not sure if i need to setup reverse proxy.Any suggestion on how to fix this ?
Dockerfile:
FROM fusionauth/fusionauth-app:latest as build FROM debian:buster-slim RUN apt-get update && apt-get install -y \ curl \ ca-certificates \ --no-install-recommends RUN groupadd fusionauth RUN useradd -r -s /bin/sh -g fusionauth -u 1001 fusionauth COPY --chown=fusionauth:fusionauth --from=build /usr/local/fusionauth /usr/local/fusionauth EXPOSE 9011 CMD ["/usr/local/fusionauth/fusionauth-app/bin/start.sh"]
-
@duke have you tried the following (move username and password to another env variables):
DATABASE_URL=postgres://top2.nearest.of.host_name-db.internal:5432/db_name
DATABASE_USERNAME=the_name
DATABASE_PASSWORD=LtMvptwX -
it was a configuration issue,
I just needed to set provide the port fusionauth was running -
@duke Awesome!
For anyone else who sees this, here's his discussion on the other forum:
https://community.fly.io/t/deploy-fusionauth-docker-images-is-not-working/6519
-
@dan Nice to finding the other forum.
Another thing is that when some create
Postgres app
(on fly.io, am not sure for other)
TheDATABASE_URL
is like thispostgres://the_name:LtMvptwX@top2.nearest.of.host_name-db.internal:5432/db_name
If you set this url to FusionAuth DATABASE_URL it will get an error saying
2022-08-26 09:16:21.106 AM ERROR com.inversoft.maintenance.db.JDBCMaintenanceModeDatabaseService - Configuration [database.url] is invalid. It must begin with either jdbc:mysql: or jdbc:postgresql: 2022-08-26 09:16:21.113 AM ERROR com.inversoft.maintenance.db.JDBCURL - Could not parse jdbcString [postgres://the_name:LtMvptwzd02JeQX@top2.nearest.of.host_name-db.internal:5432/db_name]. java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1 at com.inversoft.maintenance.db.JDBCURL.create(JDBCURL.java:70)
-
@duke Ah, how did you fix the error?
-
@dan i didnt actually fix it, i just remove it and connect through the form
-
@duke have you tried the following (move username and password to another env variables):
DATABASE_URL=postgres://top2.nearest.of.host_name-db.internal:5432/db_name
DATABASE_USERNAME=the_name
DATABASE_PASSWORD=LtMvptwX -
This post is deleted! -
-
@maciej-wisniowski That actually work