Docker Image Update

@cristi can you help me?

Trying to update the Docker image to the latest version, but can’t find the v2 image name and want to make sure that my settings will stay the same within my compose.yml.

Can you please provide instructions for updating on internally deployed instances?

Tagging @simonymous & @patryk_wozniczka as well since they are working off our server.

I’ve already seen and am referencing this article also:

Cheers,
M

Hello,

So on Docker Hub, the only mutable images are tags 2 and latest.
Tag 2 is the latest release, tag latest is the latest commit on our main branch in github.

If you have an internal deployment and want to keep things predictable and stable, I would recommend using a specific release version. Currently the latest release is 2.3.15, and this is the docker image tag that can be used for all images.

You can keep an eye on Releases · specklesystems/speckle-server · GitHub for new releases, and decide if you want to upgrade or not, and change the tag in the docker-compose.yml file.

If you need more info, can you also paste the docker images references that you currently have in the docker-compose file?
The docker-compose file mentioned in our documentation ( Deploying a Server - manual setup | Speckle Docs ) uses tag 2, and if you want to update to the latest server, you can do docker-compose pull to pull the latest images of the 2 tags.

2 Likes

Thanks, @cristi ~
This answers my question and helps clarify things.
Thanks for responding so quickly! :+1:
M

1 Like

Hi @cristi ~ responding to this thread because I recently pulled current release and am having some issues by which I believe they are related to the following discussion …

After pull the new containers from the registry, killing, and restarting speckle-server I am unable to login. Something odd with the front-end. Have you seen this and any idea what the issue may be?

Hmm, i’ve seen that when the server container was having issues starting correctly. Can you check the logs of the server container?

Sure. Where can I find them?

you can check logs using docker-compose or docker directly.
For example, docker ps to see the running containers, than docker logs [container-name]

2 Likes

Here’s the log:

[INFO  wait] --------------------------------------------------------
[INFO  wait]  docker-compose-wait 2.8.0
[INFO  wait] ---------------------------
[DEBUG wait] Starting with configuration:
[DEBUG wait]  - Hosts to be waiting for: [postgres:5432, redis:6379]
[DEBUG wait]  - Timeout before failure: 30 seconds 
[DEBUG wait]  - TCP connection timeout before retry: 5 seconds 
[DEBUG wait]  - Sleeping time before checking for hosts availability: 0 seconds
[DEBUG wait]  - Sleeping time once all hosts are available: 0 seconds
[DEBUG wait]  - Sleeping time between retries: 1 seconds
[DEBUG wait] --------------------------------------------------------
[INFO  wait] Checking availability of postgres:5432
[INFO  wait] Host postgres:5432 is now available!
[INFO  wait] --------------------------------------------------------
[INFO  wait] Checking availability of  redis:6379
[INFO  wait] Host  redis:6379 not yet available...
[INFO  wait] Host  redis:6379 is now available!
[INFO  wait] --------------------------------------------------------
[INFO  wait] docker-compose-wait - Everything's fine, the application can now start!
[INFO  wait] --------------------------------------------------------
2022-08-10T17:56:45.607Z speckle:db-startup Loaded knex conf for production
2022-08-10T17:56:46.232Z speckle:modules 💥 Init core module
2022-08-10T17:56:46.351Z speckle:modules 🔑 Init auth module
2022-08-10T17:56:46.397Z speckle:modules 💅 Init graphql api explorer module
2022-08-10T17:56:46.397Z speckle:modules 📧 Init emails module
2022-08-10T17:56:46.771Z speckle:modules ♻️  Init pwd reset module
2022-08-10T17:56:46.773Z speckle:modules 💌 Init invites module
2022-08-10T17:56:46.839Z speckle:modules 📸 Init object preview module
2022-08-10T17:56:46.946Z speckle:modules 📄 Init FileUploads module
2022-08-10T17:56:46.946Z speckle:modules 🗣  Init comments module (barebones)
2022-08-10T17:56:47.201Z speckle:modules 📦 Init BlobStorage module
2022-08-10T17:56:47.201Z speckle:www Error: Config value S3_ACCESS_KEY is missing
    at getS3Config (/speckle-server/packages/server/dist/modules/blobstorage/objectStorage.js:9:19)
    at getObjectStorage (/speckle-server/packages/server/dist/modules/blobstorage/objectStorage.js:38:26)
    at ensureStorageAccess (/speckle-server/packages/server/dist/modules/blobstorage/objectStorage.js:85:46)
    at ensureConditions (/speckle-server/packages/server/dist/modules/blobstorage/index.js:17:15)
    at Object.exports.init (/speckle-server/packages/server/dist/modules/blobstorage/index.js:41:11)
    at Object.exports.init (/speckle-server/packages/server/dist/modules/index.js:40:28)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async init (/speckle-server/packages/server/dist/app.js:139:5)
[ioredis] Unhandled error event: Error: connect ECONNREFUSED 172.18.0.3:6379
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16)
[ioredis] Unhandled error event: Error: connect ECONNREFUSED 172.18.0.3:6379
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16)
[INFO  wait] --------------------------------------------------------
[INFO  wait]  docker-compose-wait 2.8.0
[INFO  wait] ---------------------------
[DEBUG wait] Starting with configuration:
[DEBUG wait]  - Hosts to be waiting for: [postgres:5432, redis:6379]
[DEBUG wait]  - Timeout before failure: 30 seconds 
[DEBUG wait]  - TCP connection timeout before retry: 5 seconds 
[DEBUG wait]  - Sleeping time before checking for hosts availability: 0 seconds
[DEBUG wait]  - Sleeping time once all hosts are available: 0 seconds
[DEBUG wait]  - Sleeping time between retries: 1 seconds
[DEBUG wait] --------------------------------------------------------
[INFO  wait] Checking availability of postgres:5432
[INFO  wait] Host postgres:5432 not yet available...
[INFO  wait] Host postgres:5432 is now available!
[INFO  wait] --------------------------------------------------------
[INFO  wait] Checking availability of  redis:6379
[INFO  wait] Host  redis:6379 is now available!
[INFO  wait] --------------------------------------------------------
[INFO  wait] docker-compose-wait - Everything's fine, the application can now start!
[INFO  wait] --------------------------------------------------------
2022-08-10T17:57:37.911Z speckle:db-startup Loaded knex conf for production
2022-08-10T17:57:38.467Z speckle:modules 💥 Init core module
2022-08-10T17:57:38.588Z speckle:modules 🔑 Init auth module
2022-08-10T17:57:38.634Z speckle:modules 💅 Init graphql api explorer module
2022-08-10T17:57:38.634Z speckle:modules 📧 Init emails module
2022-08-10T17:57:38.904Z speckle:modules ♻️  Init pwd reset module
2022-08-10T17:57:38.905Z speckle:modules 💌 Init invites module
2022-08-10T17:57:38.977Z speckle:modules 📸 Init object preview module
2022-08-10T17:57:39.084Z speckle:modules 📄 Init FileUploads module
2022-08-10T17:57:39.085Z speckle:modules 🗣  Init comments module (barebones)
2022-08-10T17:57:39.334Z speckle:modules 📦 Init BlobStorage module
2022-08-10T17:57:39.335Z speckle:www Error: Config value S3_ACCESS_KEY is missing
    at getS3Config (/speckle-server/packages/server/dist/modules/blobstorage/objectStorage.js:9:19)
    at getObjectStorage (/speckle-server/packages/server/dist/modules/blobstorage/objectStorage.js:38:26)
    at ensureStorageAccess (/speckle-server/packages/server/dist/modules/blobstorage/objectStorage.js:85:46)
    at ensureConditions (/speckle-server/packages/server/dist/modules/blobstorage/index.js:17:15)
    at Object.exports.init (/speckle-server/packages/server/dist/modules/blobstorage/index.js:41:11)
    at Object.exports.init (/speckle-server/packages/server/dist/modules/index.js:40:28)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async init (/speckle-server/packages/server/dist/app.js:139:5)
[INFO  wait] --------------------------------------------------------
[INFO  wait]  docker-compose-wait 2.8.0
[INFO  wait] ---------------------------
[DEBUG wait] Starting with configuration:
[DEBUG wait]  - Hosts to be waiting for: [postgres:5432, redis:6379]
[DEBUG wait]  - Timeout before failure: 30 seconds 
[DEBUG wait]  - TCP connection timeout before retry: 5 seconds 
[DEBUG wait]  - Sleeping time before checking for hosts availability: 0 seconds
[DEBUG wait]  - Sleeping time once all hosts are available: 0 seconds
[DEBUG wait]  - Sleeping time between retries: 1 seconds
[DEBUG wait] --------------------------------------------------------
[INFO  wait] Checking availability of postgres:5432
[INFO  wait] Host postgres:5432 is now available!
[INFO  wait] --------------------------------------------------------
[INFO  wait] Checking availability of  redis:6379
[INFO  wait] Host  redis:6379 is now available!
[INFO  wait] --------------------------------------------------------
[INFO  wait] docker-compose-wait - Everything's fine, the application can now start!
[INFO  wait] --------------------------------------------------------
2022-08-10T18:35:23.560Z speckle:db-startup Loaded knex conf for production
2022-08-10T18:35:23.838Z speckle:modules 💥 Init core module
2022-08-10T18:35:23.914Z speckle:modules 🔑 Init auth module
2022-08-10T18:35:23.944Z speckle:modules 💅 Init graphql api explorer module
2022-08-10T18:35:23.944Z speckle:modules 📧 Init emails module
2022-08-10T18:35:24.204Z speckle:modules ♻️  Init pwd reset module
2022-08-10T18:35:24.205Z speckle:modules 💌 Init invites module
2022-08-10T18:35:24.233Z speckle:modules 📸 Init object preview module
2022-08-10T18:35:24.284Z speckle:modules 📄 Init FileUploads module
2022-08-10T18:35:24.284Z speckle:modules 🗣  Init comments module (barebones)
2022-08-10T18:35:24.398Z speckle:modules 📦 Init BlobStorage module
2022-08-10T18:35:24.399Z speckle:www Error: Config value S3_ACCESS_KEY is missing
    at getS3Config (/speckle-server/packages/server/dist/modules/blobstorage/objectStorage.js:9:19)
    at getObjectStorage (/speckle-server/packages/server/dist/modules/blobstorage/objectStorage.js:38:26)
    at ensureStorageAccess (/speckle-server/packages/server/dist/modules/blobstorage/objectStorage.js:85:46)
    at ensureConditions (/speckle-server/packages/server/dist/modules/blobstorage/index.js:17:15)
    at Object.exports.init (/speckle-server/packages/server/dist/modules/blobstorage/index.js:41:11)
    at Object.exports.init (/speckle-server/packages/server/dist/modules/index.js:40:28)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async init (/speckle-server/packages/server/dist/app.js:139:5)

Hello @markcichy

Based on your error log, the server cannot connect to your S3 compatible storage.
If you set up an object storage for the server please check, that the S3_ACCESS_KEY environment variable is properly set for the server.
If you do not want to use the object storage, which is only recommended for test servers, you can set the DISABLE_FILE_UPLOADS="true" for the server.

Odd, @gjedlicska ~ is this a new .env property? I’ve never used this in past. Will try your recommendation and see if it solves the issue.

Do you add this variable to speckle-frontend: component of the .yml file?

Example:

####
  # Speckle Server
  #######
  speckle-frontend:
    image: speckle/speckle-frontend:2
    restart: always
    ports:
      - "0.0.0.0:80:80"
    environment:
      DISABLE_FILE_UPLOADS="true"

And, if yes, can they remove the reference to minio from earlier on in my docker-compose.yml files?

i.e. remove all of the below from the dependencies.

minio:
    image: "minio/minio"
    command: server /data --console-address ":9001"
    restart: always
    volumes:
      - ./minio-data:/data
    ports:
      - "127.0.0.1:9000:9000"
      - "127.0.0.1:9001:9001"

As a tangential test, I enabled object storage, then restarted/rebuilt the containers. But am now faced with database issues. I’d prefer not to enable object storage, so will wait for your response to my previous message.

[INFO  wait] --------------------------------------------------------
[INFO  wait]  docker-compose-wait 2.8.0
[INFO  wait] ---------------------------
[DEBUG wait] Starting with configuration:
[DEBUG wait]  - Hosts to be waiting for: [postgres:5432, redis:6379, minio:9000]
[DEBUG wait]  - Timeout before failure: 30 seconds 
[DEBUG wait]  - TCP connection timeout before retry: 5 seconds 
[DEBUG wait]  - Sleeping time before checking for hosts availability: 0 seconds
[DEBUG wait]  - Sleeping time once all hosts are available: 0 seconds
[DEBUG wait]  - Sleeping time between retries: 1 seconds
[DEBUG wait] --------------------------------------------------------
[INFO  wait] Checking availability of postgres:5432
[INFO  wait] Host postgres:5432 not yet available...
[INFO  wait] Host postgres:5432 is now available!
[INFO  wait] --------------------------------------------------------
[INFO  wait] Checking availability of  redis:6379
[INFO  wait] Host  redis:6379 is now available!
[INFO  wait] --------------------------------------------------------
[INFO  wait] Checking availability of  minio:9000
[INFO  wait] Host  minio:9000 is now available!
[INFO  wait] --------------------------------------------------------
[INFO  wait] docker-compose-wait - Everything's fine, the application can now start!
[INFO  wait] --------------------------------------------------------
2022-08-11T19:46:04.440Z speckle:db-startup Loaded knex conf for production
2022-08-11T19:46:05.166Z speckle:www error: the database system is starting up
    at Parser.parseErrorMessage (/speckle-server/node_modules/pg-protocol/dist/parser.js:287:98)
    at Parser.handlePacket (/speckle-server/node_modules/pg-protocol/dist/parser.js:126:29)
    at Parser.parse (/speckle-server/node_modules/pg-protocol/dist/parser.js:39:38)
    at Socket.<anonymous> (/speckle-server/node_modules/pg-protocol/dist/index.js:11:42)
    at Socket.emit (node:events:527:28)
    at Socket.emit (node:domain:475:12)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at Socket.Readable.push (node:internal/streams/readable:228:10)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23)

Hey Mark

I had this very much same issue and in the end it was because the frontend was not able to communicate with the server due to a typo on the CANONICAL_URL environment variable.

I can see from your screenshot your canonical URL should be http://speckletwo.mobiusnode.io/ would you mind checking if your CANONICAL_URL on the docker file is: CANONICAL_URL: "http://speckletwo.mobiusnode.io"

(Note the absence of the ending “/”)

Hey @markcichy,

yes, if you disable fileuploads, you could in theory leave the minio service out of the compose file. Please note, that the fileimport-service relies on the S3 compatible object storage. We haven’t tested this extensively, but you might need to disable the fileimport-service too.

Regarding your database error, you need to set the WAIT_HOSTS: 'postgres:5432, redis:6379 env variable for the server, so that it waits for the database to start up. If that doesn’t work, the usual

should do the trick.

Let me know if you are still stuck.
Gergo

Do you add this variable to speckle-frontend: component of the .yml file?

it should be on the speckle-server container (the backend)

But am now faced with database issues.

Hmm, that should be a temporary startup issue, docker-compose should restart the server container and it should connect to the db after the db finished starting up. Can you check if the speckle-server container is restarted automatically? does it have the same error after restart?

Hi @cristi – it seems the speckle-frontend container is continuously restarting itself. Caught in a boot loop. Not sure what is causing this though.

And here is my full docker-compose.yml for ref.

version: "2"
services:
  ####
  # Speckle Server dependencies
  #######
  postgres:
    image: "postgres:13.1-alpine"
    restart: always
    environment:
      POSTGRES_DB: speckle
      POSTGRES_USER: *SOMEUSR*
      POSTGRES_PASSWORD: *SOMEPWD*
    volumes:
      - ./postgres-data:/var/lib/postgresql/data/
    ports:
      - "127.0.0.1:5432:5432"

  redis:
    image: "redis:6.0-alpine"
    restart: always
    volumes:
      - ./redis-data:/data
    ports:
      - "127.0.0.1:6379:6379"

  #minio:
  #  image: "minio/minio"
  #  command: server /data --console-address ":9001"
  #  restart: always
  #  volumes:
  #    - ./minio-data:/data
  #  ports:
  #    - "127.0.0.1:9000:9000"
  #    - "127.0.0.1:9001:9001"

  ####
  # Speckle Server
  #######
  speckle-frontend:
    image: speckle/speckle-frontend:2
    restart: always
    ports:
      - "0.0.0.0:80:80"
  #  environment:
  #    DISABLE_FILE_UPLOADS="true"

  speckle-server:
    image: speckle/speckle-server:2
    restart: always
    command: ["bash", "-c", "/wait && node bin/www"]
    environment:
      # TODO: Change this to the URL of the speckle server, as accessed from the network
      CANONICAL_URL: "https://speckletwo.mobiusnode.io"

      SESSION_SECRET: "*SOMEPWD*"

      STRATEGY_LOCAL: "true"
      DEBUG: "speckle:*"

      POSTGRES_URL: "postgres"
      POSTGRES_USER: "*SOMEUSR*"
      POSTGRES_PASSWORD: "*SOMEPWD*"
      POSTGRES_DB: "speckle"

      REDIS_URL: "redis://redis"

      DISABLE_FILE_UPLOADS: "true"
      #S3_ENDPOINT: "http://192.168.86.36:9000"
      #S3_ACCESS_KEY: "minioadmin"
      #S3_SECRET_KEY: "minioadmin991263378"
      #S3_BUCKET: "speckle-server"
      #S3_CREATE_BUCKET: "true"

      #FILE_SIZE_LIMIT_MB: 100

      WAIT_HOSTS: postgres:5432, redis:6379

      # Use this line and comment out the above if leveraging S3 storage
      #WAIT_HOSTS: postgres:5432, redis:6379, minio:9000

      EMAIL: "true"
      EMAIL_HOST: "smtp.sendgrid.net"
      EMAIL_PORT: "587"
      EMAIL_USERNAME: "*SOMEUSR*"
      EMAIL_PASSWORD: "*SOMEPWD*"
      EMAIL_FROM: "speckle@mobiusnode.io"

  preview-service:
    image: speckle/speckle-preview-service:2
    restart: always
    mem_limit: "1000m"
    memswap_limit: "1000m"
    command: ["bash", "-c", "/wait && node bin/www"]
    environment:
      DEBUG: "preview-service:*"
      PG_CONNECTION_STRING: "postgres://speckle:speckle@postgres/speckle"
      WAIT_HOSTS: postgres:5432

  webhook-service:
    image: speckle/speckle-webhook-service:2
    restart: always
    command: ["bash", "-c", "/wait && node main.js"]
    environment:
      DEBUG: "webhook-service:*"
      PG_CONNECTION_STRING: "postgres://speckle:speckle@postgres/speckle"
      WAIT_HOSTS: postgres:5432

#  fileimport-service:
#    image: speckle/speckle-fileimport-service:2
#    restart: always
#    command: ["bash", "-c", "/wait && node src/daemon.js"]
#    environment:
#      DEBUG: "fileimport-service:*"
#      PG_CONNECTION_STRING: "postgres://speckle:speckle@postgres/speckle"
#      WAIT_HOSTS: postgres:5432
#
#      S3_ENDPOINT: "http://minio:9000"
#      S3_ACCESS_KEY: "minioadmin"
#      S3_SECRET_KEY: "minioadmin"
#      S3_BUCKET: "speckle-server"
#
#      SPECKLE_SERVER_URL: "http://speckle-server:3000"

Hello @markcichy

you are probably getting an image version, where we strictly require an environment variable to be set on the frontend container. Make sure to set the FILE_SIZE_LIMIT variable.

  speckle-frontend:
    image: speckle/speckle-frontend:2
    restart: always
    ports:
      - "0.0.0.0:80:80"
    environment:
      FILE_SIZE_LIMIT_MB: 100

I think this will solve it for you.
Regards.
Gergo

ps.: a fix is inbound for this, to not be mandatory

1 Like

Progress, @gjedlicska … at least I have a front-end now, but still no login form. Still says “interoperability in seconds” but with no fields for usr/pwd (see screenshot).

That is a symptom of the backend not accessible from the frontend. Could you send the logs of the speckle-server container?