# Unable to deploy python app with weaviate using a single docker-compose.yml file

**URL:** https://forum.weaviate.io/t/unable-to-deploy-python-app-with-weaviate-using-a-single-docker-compose-yml-file/265
**Category:** Support
**Created:** [June 22, 2023, 9:07am UTC](https://forum.weaviate.io/t/unable-to-deploy-python-app-with-weaviate-using-a-single-docker-compose-yml-file/265 "2023-06-22T09:07:55Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Sriparna](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@Sriparna](https://forum.weaviate.io/u/Sriparna)
#### Post date: [June 22, 2023, 9:07am UTC](https://forum.weaviate.io/t/unable-to-deploy-python-app-with-weaviate-using-a-single-docker-compose-yml-file/265/1 "2023-06-22T09:07:55Z")

</div>

Hi,

I have added my python service in the docker-compose.yml file generated from weaviate site. When i run docker-compose up command I am expecting to run my python scripts which creates schema in weaviate and adds data to it. However, even though the weaviate image is running on locahost:8080 after executing docker-compose up, the python script is failing with below error:

weaviate.exceptions.WeaviateStartUpError: Weaviate did not start up in 5 seconds. Either the Weaviate URL [http://localhost:8080](http://localhost:8080) is wrong or Weaviate did not start up in the interval given in ‘startup\_period’

My docker-compose.yml file is as below:  
version: ‘3.4’  
services:  
weaviate:  
image: semitechnologies/weaviate:1.19.6  
restart: on-failure:0  
ports:  
- “8080:8080”  
environment:  
QUERY\_DEFAULTS\_LIMIT: 25  
AUTHENTICATION\_ANONYMOUS\_ACCESS\_ENABLED: ‘true’  
PERSISTENCE\_DATA\_PATH: “./data”  
DEFAULT\_VECTORIZER\_MODULE: text2vec-transformers  
ENABLE\_MODULES: ‘text2vec-transformers, text2vec-openai,generative-openai’  
TRANSFORMERS\_INFERENCE\_API: [http://t2v-transformers:8080](http://t2v-transformers:8080)  
CLUSTER\_HOSTNAME: ‘node1’  
t2v-transformers:  
image: semitechnologies/transformers-inference:sentence-transformers-paraphrase-MiniLM-L6-v2  
environment:  
ENABLE\_CUDA: 0 # set to 1 to enable  
# NVIDIA\_VISIBLE\_DEVICES: all # enable if running with CUDA  
web:  
build: .  
command: python src/createschema.py && adddata.py && python src/test.py"  
ports:  
- ‘5000:5000’  
depends\_on:  
- weaviate  
- t2v-transformers

Please let me know if anything is missing in my configuration.  
Thanks in advance.

---

<div class="post-metadata">

### Author: ![maureenxu](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/maureenxu/32/460_2.png) [@maureenxu](https://forum.weaviate.io/u/maureenxu)
#### Post date: [September 14, 2023, 8:00am UTC](https://forum.weaviate.io/t/unable-to-deploy-python-app-with-weaviate-using-a-single-docker-compose-yml-file/265/2 "2023-09-14T08:00:27Z")

</div>

I’m having the same issue. I’ve tried to add a healthcheck step in the docker-compose file which didn’t help either. Does anyone know how to solve it?

---

<div class="post-metadata">

### Author: ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)
#### Post date: [September 14, 2023, 11:57am UTC](https://forum.weaviate.io/t/unable-to-deploy-python-app-with-weaviate-using-a-single-docker-compose-yml-file/265/3 "2023-09-14T11:57:04Z")

</div>

Hi!

I believe the issue is that if your script is running inside a docker in a docker-compose, it should point to weaviate at `http://weaviate:8080` and not at localhost, as it is running on a different host.

Let me know if this helps 🙂

---

<div class="post-metadata">

### Author: ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)
#### Post date: [September 14, 2023, 11:58am UTC](https://forum.weaviate.io/t/unable-to-deploy-python-app-with-weaviate-using-a-single-docker-compose-yml-file/265/4 "2023-09-14T11:58:47Z")

</div>

By the way, this is a great example on how you can do it:

> <https://github.com/weaviate/Verba/blob/79aaa08c93ea317e9b911f13cf32699fcef6af40/docker-compose.yml>

---

<div class="post-metadata">

### Author: ![pradumn203](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/pradumn203/32/503_2.png) [@pradumn203](https://forum.weaviate.io/u/pradumn203)
#### Post date: [September 22, 2023, 10:58am UTC](https://forum.weaviate.io/t/unable-to-deploy-python-app-with-weaviate-using-a-single-docker-compose-yml-file/265/5 "2023-09-22T10:58:52Z")

</div>

Can you also send you Dockerfile once to have a look and once tell what url are you mentioning in chreateschema.py & adddata.py while initializing the weaviate client.

---

<div class="post-metadata">

### Author: ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)
#### Post date: [September 23, 2023, 8:48am UTC](https://forum.weaviate.io/t/unable-to-deploy-python-app-with-weaviate-using-a-single-docker-compose-yml-file/265/6 "2023-09-23T08:48:32Z")

</div>

Hi! The entire is here:

> **[GitHub - weaviate/Verba: Retrieval Augmented Generation (RAG) chatbot powered...](https://github.com/weaviate/Verba/)**
>
> Retrieval Augmented Generation (RAG) chatbot powered by Weaviate - GitHub - weaviate/Verba: Retrieval Augmented Generation (RAG) chatbot powered by Weaviate

---

<div class="post-metadata">

### Author: ![pradumn203](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/pradumn203/32/503_2.png) [@pradumn203](https://forum.weaviate.io/u/pradumn203)
#### Post date: [September 26, 2023, 4:28am UTC](https://forum.weaviate.io/t/unable-to-deploy-python-app-with-weaviate-using-a-single-docker-compose-yml-file/265/7 "2023-09-26T04:28:43Z")

</div>

@Sriparna In your createschema.py, adddata.py or test.py, if you have anywhere initialized the weaviate client and given localhost or any other url just change it to:

```auto
http://weaviate:8080

```

I did the same in mine and worked for me.
