Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    Docker SQL_CONNECTION_STRING Env Variable Ignored

    Scheduled Pinned Locked Moved Support
    2 Posts 1 Posters 9 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.
    • D Offline
      dan.rossiter_8291
      last edited by

      We've followed the directions as provided here, but the SQL_CONNECTION_STRING appears to be ignored by the proget container. When a connection string with DB hostname other than "proget-sql" is provided, that host is ignored and proget attempts to reach "proget-sql" anyway. When we spin up SQL server instance on the hostname "proget-sql", we get past DNS resolution, but then fail when trying to authenticate to the instance. All of this combined suggests the documented environment variable is not actually being provided to proget process.

      Is there a different approach outside of the provided documentation we should be using instead?

      The docker-compose file we're using is the following:

      version: '3'
      
      services:
        proget:
          image: proget.inedo.com/productimages/inedo/proget:5.3.7
          restart: unless-stopped
          environment:
            - 'SQL_CONNECTION_STRING=Data Source=proget_db;Initial Catalog=ProGet;User ID=sa;Password=******'
          volumes:
            - packages:/var/proget/packages
            - extensions:/var/proget/extensions
          ports:
            - 80:80
      
        proget_db:
          image: mcr.microsoft.com/mssql/server:2019-latest
          restart: unless-stopped
          volumes:
            - database:/var/opt/mssql
          ports:
            - 1433:1433
          environment:
            - ACCEPT_EULA=Y
            - MSSQL_SA_PASSWORD=******
            - MSSQL_PID=Express
      
      volumes:
        database:
        packages:
        extensions:
      
      1 Reply Last reply Reply Quote 0
      • D Offline
        dan.rossiter_8291
        last edited by

        We finally got to the bottom of this. Environment variable was right, but there was an old container hanging around in the background confusing the docker network about what should match our proget_db.

        1 Reply Last reply Reply Quote 0

        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
        • 1 / 1
        • First post
          Last post
        Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation