Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added docker-compose.yml and env variable OCTANE_OPTIONS #97

Closed
wants to merge 3 commits into from

Conversation

travisaustin
Copy link
Contributor

The docker-compose.yml file provides services for octane, horizon, and scheduler. It also provides a Redis and a MySQL container.

When running for local development, add COMPOSE_PROFILES=dev to your local .env file. This will use the php-dev service instead of the php service (to enable --watch in octane). It will also disable horizon and the scheduler.

When running in production, you can leave leave COMPOSE_PROFILES out of your .env file, or you can use COMPOSE_PROFILES=with_redis, COMPOSE_PROFILES=with_mysql, or COMPOSE_PROFILES=with_redis,with_mysql to enable Redis and/or MySQL.

If you prefer to not add the environment variable to .env, you can bring the services up with a profile by using docker compose --profile dev up

Travis Austin added 3 commits November 26, 2024 06:52
The docker-compose.yml file provides services for octane, horizon, and scheduler. It also provides a redis and a mysql container.

When running for local development, add `COMPOSE_PROFILES=dev` to your local .env file. This will use the `php-dev` service instead of the `php` service (to enable `--watch` in octane). It will also disable horizon and the scheduler.

When running in production, you can leave leave `COMPOSE_PROFILES` out of your .env file, or you can use `COMPOSE_PROFILES=with_redis`, `COMPOSE_PROFILES=with_mysql`, or `COMPOSE_PROFILES=with_redis,with_mysql` to enable Redis and/or MySQL.

If you prefer to not add the environment variable to .env, you can bring the services up with a profile by using `docker compose --profile dev up`
All containers are running php, so naming a container `php` is ambiguous. Changed the container that serves http requests to `http`.

Added a new environment variable `HTTP_PORT` to allow overriding the default HTTP port, and set the default port to 80.
@ProtocolNebula
Copy link

ProtocolNebula commented Dec 19, 2024

Today I've learnt something new about docker-compose that I see nowhere haha

I've planned to send a PR with the docker-compose for production, but I guess you'rs is better (has more cases)

EDIT: @travisaustin , what are the requirements to run this? I tried to copy in my local environment (with a custom build) but I just get the following error:

validating /home/ruben/repos/comparador-electricidad/docker-compose.yml: services.app-standalone Additional property <<< is not allowed

@smortexa smortexa mentioned this pull request Jan 3, 2025
@smortexa
Copy link
Member

smortexa commented Jan 3, 2025

Close in favor of #111

@smortexa smortexa closed this Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants