# Okteto Pipelines vs Deploy Preview Actions for \`docker-compose\` Files

**URL:** <https://community.okteto.com/t/okteto-pipelines-vs-deploy-preview-actions-for-docker-compose-files/957>\
**Category:** How Do I?\
**Created:** [July 25, 2023, 9:28pm UTC](https://community.okteto.com/t/okteto-pipelines-vs-deploy-preview-actions-for-docker-compose-files/957 "2023-07-25T21:28:03Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![justinjao](https://sea1.discourse-cdn.com/flex019/user_avatar/community.okteto.com/justinjao/32/439_2.png) [@justinjao](https://community.okteto.com/u/justinjao)\
**Post date:** [July 25, 2023, 9:28pm UTC](https://community.okteto.com/t/okteto-pipelines-vs-deploy-preview-actions-for-docker-compose-files/957/1 "2023-07-25T21:28:03Z")

</div>

Hi there! I was hoping to get some clarifications on what the best way of utilizing Okteto for my usecase would be.

I have a repository with the following files:

- **docker-compose.yml** - this spins up a java backend + React frontend web app, a MySQL, and a MongoDB instance
- **A bash script** - downloads seed data and initializes the MySQL database
- **`data` directory** - contains data files that will be imported into the containers spun up
- Inside one of the containers spun up by the docker-compose file, I also have a Python script which needs to be run to import the data from the `data` directory into the MySQL database.

I want to setup the repo such that pull requests automatically trigger a build of the docker compose file, with the data in the `data` directory imported into the web application+databases running in the container. This build will essentially be a staging instance to preview the new data files and how they look when run in the application.

Thus, my plan was to essentially setup a GitHub Action Workflow that does the following steps on a pull request to the repo:

- run the bash script
- Use an **Okteto Pipeline action** to run the docker compose file to spin up the application and databases (previously a `docker compose up` command)
- execute the Python script inside the running container to import some data into the container (previously a `docker compose exec` command)

**I just wanted to clarify** what exactly the recommended way of approaching this using Okteto would be. I had previously tried using Preview Environments (and the `deploy-preview` GitHub action) to do this, but even though the compose file supposedly deploys correctly, I am unable to access the endpoint (from my understanding, the `deploy-preview` action checks out the repo from scratch, and so the setup from the bash script is not carried forward).

I am able to properly deploy the compose file using local CLI commands (`okteto deploy` or `okteto up`) however, which is why I thought to use Okteto Pipelines.

I was also unclear about whether I needed to specifically use an `okteto.yml` file, or whether I could stick to just using the docker-compose file, as well as whether this was actually the right usecase for **Okteto Pipelines.**

Any clarifications would be much appreciated!

---

_[View the full topic](https://community.okteto.com/t/okteto-pipelines-vs-deploy-preview-actions-for-docker-compose-files/957)._
