Back

Cant run docker compose up -d

  • 0
  • Self Hosted
cakedayy
27 Jun, 2023, 16:14

appwrite git:(main) ✗ docker-compose up -d
[+] Running 11/1 ⠿ Network appwrite_appwrite Created 0.0s [+] Running 12/11te_runtimes Created 0.0s ⠿ Network appwrite_appwrite Created 0.0s ⠿ Network appwrite_runtimes Created 0.0s ⠿ Network appwrite_gateway Created 0.0s ... ... ⠿ Volume "appwrite_appwrite-cache" Created 0.0s ⠿ Volume "appwrite_appwrite-functions" Create... 0.0s ⠿ Volume "appwrite_appwrite-redis" Created 0.0s ⠿ Volume "appwrite_appwrite-builds" Created 0.0s ⠿ Volume "appwrite_appwrite-certificates" Cre... 0.0s ⠋ Container appwrite-telegraf Creating 0.0s ⠋ Container appwrite-influxdb Creating 0.0s ⠋ Container appwrite-redis Creating 0.0s ⠋ Container appwrite-mariadb Creating 0.0s Error response from daemon: Conflict. The container name "/appwrite-redis" is already in use by container "0be6aaf59a903dea89c3687e662450f0bccf568f80c97c36e3af90312e269395". You have to remove (or rename) that container to be able to reuse that name.

TL;DR
The user is having trouble running `docker-compose up -d` and is seeing volumes and services with names prepended with the parent folder name. They need to rename the parent folder to 'appwrite' and rerun the command. If containers need to be restarted, they should remove all old containers using the command `docker rm -f $(docker ps -a -q)`. There is also an error message about a conflicting container name, and the user needs to remove or rename the existing container.
Binyamin
27 Jun, 2023, 16:15

It seems like you already have appwrite-redis run before.

Binyamin
27 Jun, 2023, 16:16

Run

TypeScript
docker-compose ls

And

TypeScript
docker ps -a

And share the results.

cakedayy
27 Jun, 2023, 16:19
Binyamin
27 Jun, 2023, 16:35

You'll need to remove all old containers

Binyamin
27 Jun, 2023, 16:36

Is this production or development?

cakedayy
27 Jun, 2023, 16:36

development; but after setting up db's, functions, etc

cakedayy
27 Jun, 2023, 16:37

If I try restarting containers, I get the error:

appwrite git:(main) ✗ docker compose start service "influxdb" has no container to start

But influxdb, redis, etc all clearly have created containers...

Binyamin
27 Jun, 2023, 16:37

Okay, Use it on your own risk (maybe after backup) This command will remove and delete all of you containers, it won't delete volumes, etc.

TypeScript
docker rm -f $(docker ps -a -q)
Binyamin
27 Jun, 2023, 16:37

Then, you can run

TypeScript
docker-compose up -d 
cakedayy
27 Jun, 2023, 16:41

worked like a charm -- why did these containers need to be nuked though?

Binyamin
27 Jun, 2023, 16:41

<a:agooglethumbsup:635256484682530825>

Binyamin
27 Jun, 2023, 16:42

Docker compose needs to run all the serices as a whole, from some reason the appwrite-redis wasn't attached, then the best is to get rid of all of them.

Binyamin
27 Jun, 2023, 16:42

And just restart the compose file.

Binyamin
27 Jun, 2023, 16:42

As the data is persisted into Docker volumes.

cakedayy
27 Jun, 2023, 17:02

got it; I ran into this issue earlier trying to get a function to work and just nuked everything since I wasn't too far into a project.

I noticed that the name of the parent folder of the docker-compose file is getting prepended to a lot of the services/volumes. I'm gathering that this is pretty important?

Binyamin
27 Jun, 2023, 17:03

What you mean prepended can you show how?

cakedayy
27 Jun, 2023, 19:48
cakedayy
27 Jun, 2023, 19:49

there was a issue thread that explained this -- and why the parent folder should be named appwrite. I had it named backend before, all of the volume names were prepended with backend_*

Binyamin
27 Jun, 2023, 20:01

That's how docker work

Binyamin
27 Jun, 2023, 20:01

It's the expected behavior

Binyamin
27 Jun, 2023, 20:02

And for you it will stay the same name as in the docker compose

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more