• Home
  • Categories
  • Recent
  • Popular
  • Pricing
  • Contact us
  • Docs
  • Login
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 23 Aug 2022, 15:08

    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 30 Aug 2022, 21:01

      @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 31 Aug 2022, 14:36 Reply Quote 0
      • D
        duke
        last edited by 25 Aug 2022, 09:06

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

        D 1 Reply Last reply 25 Aug 2022, 15:03 Reply Quote 1
        • D
          dan @duke
          last edited by 25 Aug 2022, 15:03

          @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 26 Aug 2022, 09:25 Reply Quote 0
          • D
            duke @dan
            last edited by 26 Aug 2022, 09:25

            @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)
            
            
            D 1 Reply Last reply 26 Aug 2022, 12:57 Reply Quote 0
            • D
              dan @duke
              last edited by 26 Aug 2022, 12:57

              @duke Ah, how did you fix the error?

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

              D 1 Reply Last reply 29 Aug 2022, 10:41 Reply Quote 0
              • D
                duke @dan
                last edited by 29 Aug 2022, 10:41

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

                M 1 Reply Last reply 30 Aug 2022, 21:01 Reply Quote 1
                • M
                  maciej.wisniowski Power User @duke
                  last edited by 30 Aug 2022, 21:01

                  @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 31 Aug 2022, 14:36 Reply Quote 0
                  • D
                    duke @maciej.wisniowski
                    last edited by 31 Aug 2022, 14:36

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

                      @maciej-wisniowski That actually work

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