From d620a5102a18cb90da73b9ee7934b29f4e380311 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20H=C3=A9lias?= Date: Mon, 2 Oct 2023 10:52:32 +0200 Subject: [PATCH] Adding --detach option to the command --- README.md | 2 +- docs/build.md | 12 ++++++------ docs/production.md | 4 ++-- frankenphp/docker-entrypoint.sh | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index d61496b..52255f4 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ with [FrankenPHP](https://frankenphp.dev) and [Caddy](https://caddyserver.com/) 1. If not already done, [install Docker Compose](https://docs.docker.com/compose/install/) (v2.10+) 2. Run `docker compose build --no-cache` to build fresh images -3. Run `docker compose up --pull --wait` to start the project +3. Run `docker compose up --pull -d --wait` to start the project 4. Open `https://localhost` in your favorite web browser and [accept the auto-generated TLS certificate](https://stackoverflow.com/a/15076602/1352334) 5. Run `docker compose down --remove-orphans` to stop the Docker containers. diff --git a/docs/build.md b/docs/build.md index aefc2f3..fc82e01 100644 --- a/docs/build.md +++ b/docs/build.md @@ -8,10 +8,10 @@ For instance, use the following command to install Symfony 5.4: On Linux: - SYMFONY_VERSION=5.4.* docker compose up --wait + SYMFONY_VERSION=5.4.* docker compose up -d --wait On Windows: - set SYMFONY_VERSION=5.4.*&& docker compose up --wait&set SYMFONY_VERSION= + set SYMFONY_VERSION=5.4.*&& docker compose up -d --wait&set SYMFONY_VERSION= ## Installing Development Versions of Symfony @@ -22,17 +22,17 @@ For instance, use the following command to use the development branch of Symfony On Linux: - STABILITY=dev docker compose up --wait + STABILITY=dev docker compose up -d --wait On Windows: - set STABILITY=dev&& docker compose up --wait&set STABILITY= + set STABILITY=dev&& docker compose up -d --wait&set STABILITY= ## Customizing the Server Name Use the `SERVER_NAME` environment variable to define your custom server name(s). - SERVER_NAME="app.localhost" docker compose up --wait + SERVER_NAME="app.localhost" docker compose up -d --wait *Tips: You can define your server name variable in your `.env` file to keep it at each up* @@ -40,7 +40,7 @@ Use the `SERVER_NAME` environment variable to define your custom server name(s). Use the environment variables `HTTP_PORT`, `HTTPS_PORT` and/or `HTTP3_PORT` to adjust the ports to your needs, e.g. - HTTP_PORT=8000 HTTPS_PORT=4443 HTTP3_PORT=4443 docker compose up --wait + HTTP_PORT=8000 HTTPS_PORT=4443 HTTP3_PORT=4443 docker compose up -d --wait to access your application on [https://localhost:4443](https://localhost:4443). diff --git a/docs/production.md b/docs/production.md index 02fbd11..e45070f 100644 --- a/docs/production.md +++ b/docs/production.md @@ -61,7 +61,7 @@ Go into the directory containing your project (``), and start the SERVER_NAME=your-domain-name.example.com \ APP_SECRET=ChangeMe \ CADDY_MERCURE_JWT_SECRET=ChangeThisMercureHubJWTSecretKey \ -docker compose -f docker-compose.yml -f docker-compose.prod.yml up --wait +docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d --wait ``` Be sure to replace `your-domain-name.example.com` by your actual domain name and to set the values of `APP_SECRET`, `CADDY_MERCURE_JWT_SECRET` to cryptographically secure random values. @@ -77,7 +77,7 @@ Alternatively, if you don't want to expose an HTTPS server but only an HTTP one, SERVER_NAME=:80 \ APP_SECRET=ChangeMe \ CADDY_MERCURE_JWT_SECRET=ChangeThisMercureHubJWTSecretKey \ -docker compose -f docker-compose.yml -f docker-compose.prod.yml up --wait +docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d --wait ``` ## Deploying on Multiple Nodes diff --git a/frankenphp/docker-entrypoint.sh b/frankenphp/docker-entrypoint.sh index aba856b..0c7063e 100755 --- a/frankenphp/docker-entrypoint.sh +++ b/frankenphp/docker-entrypoint.sh @@ -17,7 +17,7 @@ if [ "$1" = 'frankenphp' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then composer config --json extra.symfony.docker 'true' if grep -q ^DATABASE_URL= .env; then - echo "To finish the installation please press Ctrl+C to stop Docker Compose and run: docker compose up --build --wait" + echo "To finish the installation please press Ctrl+C to stop Docker Compose and run: docker compose up --build -d --wait" sleep infinity fi fi