Speckle v2 Docker deployment

Hi there,
Been trying to set things up to quickly use speckle as a start.

Trying to host on AWS an EC2 instance to just get it up. However, I had a few problems.

Following the setup instructions was fine, until running docker-compose up -d
it will give the following error invalid mount config for type "bind": bind source path does not exist complaining about /opt/speckle/postgres-data. That isn’t an issue, manually creating the folder allows the docker-compose command to pass.

I had the same visual issue as this
and following the thread and using docker-compose logs speckle-server logs are as follows:

speckle-speckle-server-1 | [INFO wait] docker-compose-wait 2.8.0 speckle-speckle-server-1 | [INFO wait] --------------------------- speckle-speckle-server-1 | [DEBUG wait] Starting with configuration: speckle-speckle-server-1 | [DEBUG wait] - Hosts to be waiting for: [postgres:5432, redis:6379, minio:9000] speckle-speckle-server-1 | [DEBUG wait] - Timeout before failure: 30 seconds speckle-speckle-server-1 | [DEBUG wait] - TCP connection timeout before retry: 5 seconds speckle-speckle-server-1 | [DEBUG wait] - Sleeping time before checking for hosts availability: 0 seconds speckle-speckle-server-1 | [DEBUG wait] - Sleeping time once all hosts are available: 0 seconds speckle-speckle-server-1 | [DEBUG wait] - Sleeping time between retries: 1 seconds speckle-speckle-server-1 | [DEBUG wait] -------------------------------------------------------- speckle-speckle-server-1 | [INFO wait] Checking availability of postgres:5432 speckle-speckle-server-1 | [INFO wait] Host postgres:5432 not yet available... speckle-speckle-server-1 | [INFO wait] Host postgres:5432 not yet available... speckle-speckle-server-1 | [INFO wait] Host postgres:5432 is now available! speckle-speckle-server-1 | [INFO wait] -------------------------------------------------------- speckle-speckle-server-1 | [INFO wait] Checking availability of redis:6379 speckle-speckle-server-1 | [INFO wait] Host redis:6379 is now available! speckle-speckle-server-1 | [INFO wait] -------------------------------------------------------- speckle-speckle-server-1 | [INFO wait] Checking availability of minio:9000 speckle-speckle-server-1 | [INFO wait] Host minio:9000 not yet available... speckle-speckle-server-1 | [INFO wait] Host minio:9000 is now available! speckle-speckle-server-1 | [INFO wait] -------------------------------------------------------- speckle-speckle-server-1 | [INFO wait] docker-compose-wait - Everything's fine, the application can now start! speckle-speckle-server-1 | [INFO wait] -------------------------------------------------------- speckle-speckle-server-1 | 2021-11-16T02:44:58.862Z speckle:db-startup Loaded knex conf for production speckle-speckle-server-1 | 2021-11-16T02:44:59.142Z speckle:www error: database "speckle" does not exist
I am unsure how to proceed. Perhaps I missed a step somewhere?

Hey @eugeneida

What is the value POSTGRES_DB environment variable for your Postgres config?
Which docker-compose file are you using?

image

If you’ve changed it from speckle, you have to make sure it is matching for all the services. Not only server, but webhooks, previews and fileimport.

1 Like

Hi thanks for the reply, but I’ve changed only the necessary bits, and left it mostly default for now as we’re just trying it out.
docker-compose-speckle

Ok, this looks good, how are you running you postgres database?

If you connect to the DB instance with any postgres compatible db manager, do you see the speckle database?

Hmm, I see you changed the default POSTGRES_USER and POSTGRES_PASSWORD in the speckle-server service configuration.

As Gergő mentioned, did you happen to also change the POSTGRES_DB variable for the postgres service and left it as the default speckle for the speckle-server service configuration?

Can you copy-paste the config for the postgres service? (blank out sensitive values, but be aware they have to match in the postgres service config with the ones from the speckle-server service config)

@eugeneida Also, if this virtual machine is dedicated for the speckle server, feel free to leave the default speckle DB, and credentials speckle/speckle, as the database is not exposed outside of the virtual machine, so no one can access it directly to be able to login.

Of course, you can change the defaults, but they have to match in the configuration for all services in the docker-compose.yml that are configured with the DB connection info.

Hi thanks for all the replies!

Thanks for the hint about the matching names, it was exactly that. I’ve since changed it back to default and it seems to be working fine.

3 Likes