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

    Deploy FusionAuth docker image to Fly.io

    Scheduled Pinned Locked Moved Solved
    Q&A
    3
    9
    1.5k
    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.
    • D
      duke
      last edited by

      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"]
      
      1 Reply Last reply Reply Quote 0
      • M
        maciej.wisniowski Power User @duke
        last edited by

        @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

        D 2 Replies Last reply Reply Quote 0
        • D
          duke
          last edited by

          it was a configuration issue,
          I just needed to set provide the port fusionauth was running

          danD 1 Reply Last reply Reply Quote 1
          • danD
            dan @duke
            last edited by

            @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

            --
            FusionAuth - Auth for devs, built by devs.
            https://fusionauth.io

            D 1 Reply Last reply Reply Quote 0
            • D
              duke @dan
              last edited by

              @dan Nice to finding the other forum.

              Another thing is that when some create Postgres app (on fly.io, am not sure for other)
              The DATABASE_URL is like this postgres://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)
              
              
              danD 1 Reply Last reply Reply Quote 0
              • danD
                dan @duke
                last edited by

                @duke Ah, how did you fix the error?

                --
                FusionAuth - Auth for devs, built by devs.
                https://fusionauth.io

                D 1 Reply Last reply Reply Quote 0
                • D
                  duke @dan
                  last edited by

                  @dan i didnt actually fix it, i just remove it and connect through the form

                  M 1 Reply Last reply Reply Quote 1
                  • M
                    maciej.wisniowski Power User @duke
                    last edited by

                    @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

                    D 2 Replies Last reply Reply Quote 0
                    • D
                      duke @maciej.wisniowski
                      last edited by

                      This post is deleted!
                      1 Reply Last reply Reply Quote 0
                      • D duke has marked this topic as solved on
                      • D
                        duke @maciej.wisniowski
                        last edited by

                        @maciej-wisniowski That actually work

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post