# Python Stack

The example below demonstrates a Vue /Nuxt js, FastApi, Sqlite, Redis stack sample `docker-compose.yml` with the pre-defined Sidecar.

<img src="https://3706867246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0tGo33otNRgIhFn6lpgU%2Fuploads%2FglSCB8Cldt7fOEfKHgfR%2Fpython.png?alt=media&#x26;token=8e3078c1-0844-4638-9672-0aebd0b04d9e" alt="" data-size="line"><img src="https://3706867246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0tGo33otNRgIhFn6lpgU%2Fuploads%2FB0FoK4DvVcI5RFk66xDR%2Fvuejs.png?alt=media&#x26;token=8c2824de-3d91-4776-82f4-2cb9b2b89556" alt="" data-size="line"><img src="https://3706867246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0tGo33otNRgIhFn6lpgU%2Fuploads%2FOuJ3PqhWCkvKEOxu14eq%2Ficons8-redis-48.png?alt=media&#x26;token=d07991cb-26cb-4fd6-986f-858790f289c9" alt="" data-size="line">

{% code title="docker-compose.yml" %}

```docker
# Docker Compose Example code for Python
version: '3.3'
services:
   fastapi:
      build: ./server
      container_name: fastapi
      ports:
         - "5000:5000"
      command:  uvicorn server.backend.main:app --reload --workers 1 --host 0.0.0.0 --port 5000
      environment:
         - DATABASE_URL=sqlite:///./sql_app.db
      restart: always
      tty: true
   
   frontend:
      build: ./app
      working_dir: /app
      ports:
         - "8000:8000"
      environment:
         - HOST=0.0.0.0
      container_name: nuxt-app
      command: npm start
      restart: always
      tty: true
   
   cache:
      image: redis:6.2
      restart: always
      ports:
      - "6379:6379"
      command: redis-server --save 20 1 --loglevel warning
   
   
   sidecar:
      image: industryapps.azurecr.io/service-discovery-sidecar
      container_name: sidecar
      environment:
         NODE_ENV: production
         DEPLOYMENT_MODE: public
         EUREKA_INSTANCE_IP: { IP }
         EUREKA_INSTANCE_PORT: { PORT }
         EUREKA_INSTANCE_APP: { APPCODE }
         EUREKA_HOST: servicediscovery.uat.industryapps.net
         EUREKA_PORT: 443
         EUREKA_INSTANCE_HOST_NAME: { HOSTNAME }
      
networks:
   default:
      driver: bridge
```

{% endcode %}

Inside the `docker-compose.yml` file, add the necessary information which is tagged with curly braces ' `{  }` '.&#x20;

* **`IP`** -> The IP of the web service which you are running, such as on AWS EC2 Ubuntu, Lightsail instance or Azure Web services as an example.
* **`PORT`** -> The port which the app client-side is served at (e.g. Port 80).
* **`APPCODE`** -> Navigate to Developer dashboard > Applications > {App Name} > App Data, the Application code will be available there.
* **`HOSTNAME`** -> Can be found on the Developer dashboard, the boilerplate is the hostname  of the application: `https://<your_domain>/{APPCODE}`

{% hint style="info" %}
If the application container is pushed onto IndustryApps, the HOSTNAME is the Application ID.
{% endhint %}

[Additional information about Production deployment can be found here.](https://docs.industryapps.net/connect-to-the-platform/production-deployment)
