Skip to content

Commit d1dd21d

Browse files
maxheliasLucasHospice
authored andcommitted
feat: Promote Compose v2
1 parent 75a21ea commit d1dd21d

File tree

9 files changed

+24
-24
lines changed

9 files changed

+24
-24
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ jobs:
1212
- name: Checkout
1313
uses: actions/checkout@v2
1414
- name: Pull images
15-
run: docker-compose pull
15+
run: docker compose pull
1616
- name: Start services
17-
run: docker-compose up --build -d
17+
run: docker compose up --build -d
1818
- name: Wait for services
1919
run: |
20-
while status="$(docker inspect --format="{{if .Config.Healthcheck}}{{print .State.Health.Status}}{{end}}" "$(docker-compose ps -q php)")"; do
20+
while status="$(docker inspect --format="{{if .Config.Healthcheck}}{{print .State.Health.Status}}{{end}}" "$(docker compose ps -q php)")"; do
2121
case $status in
2222
starting) sleep 1;;
2323
healthy) exit 0;;

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ A [Docker](https://www.docker.com/)-based installer and runtime for the [Symfony
77
## Getting Started
88

99
1. If not already done, [install Docker Compose](https://docs.docker.com/compose/install/)
10-
2. Run `docker-compose build --pull --no-cache` to build fresh images
11-
3. Run `docker-compose up` (the logs will be displayed in the current shell)
10+
2. Run `docker compose build --pull --no-cache` to build fresh images
11+
3. Run `docker compose up` (the logs will be displayed in the current shell)
1212
4. Open `https://localhost` in your favorite web browser and [accept the auto-generated TLS certificate](https://stackoverflow.com/a/15076602/1352334)
13-
5. Run `docker-compose down --remove-orphans` to stop the Docker containers.
13+
5. Run `docker compose down --remove-orphans` to stop the Docker containers.
1414

1515
## Features
1616

docker/php/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ if [ "$1" = 'php-fpm' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then
3434

3535
if grep -q ^DATABASE_URL= .env; then
3636
if [ "$CREATION" = "1" ]; then
37-
echo "To finish the installation please press Ctrl+C to stop Docker Compose and run: docker-compose up --build"
37+
echo "To finish the installation please press Ctrl+C to stop Docker Compose and run: docker compose up --build"
3838
sleep infinity
3939
fi
4040

docs/build.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
By default, Symfony Docker will install the minimalist skeleton.
66
To install the ["website skeleton"](https://symfony.com/doc/current/setup.html#creating-symfony-applications), use the following command:
77

8-
SKELETON=symfony/website-skeleton docker-compose up --build
8+
SKELETON=symfony/website-skeleton docker compose up --build
99

1010
## Selecting a Specific Symfony Version
1111

1212
Use the `SYMFONY_VERSION` environment variable to select a specific Symfony version.
1313

1414
For instance, use the following command to install Symfony 4.4:
1515

16-
SYMFONY_VERSION=4.4.* docker-compose up --build
16+
SYMFONY_VERSION=4.4.* docker compose up --build
1717

1818
## Installing Development Versions of Symfony
1919

@@ -22,20 +22,20 @@ The value must be [a valid Composer stability option](https://getcomposer.org/do
2222

2323
For instance, use the following command to use the `master` branch of Symfony:
2424

25-
STABILITY=dev docker-compose up --build
25+
STABILITY=dev docker compose up --build
2626

2727
## Customizing the Server Name
2828

2929
Use the `SERVER_NAME` environment variable to define your custom server name(s).
3030

31-
SERVER_NAME="symfony.localhost, caddy:80" docker-compose up --build
31+
SERVER_NAME="symfony.localhost, caddy:80" docker compose up --build
3232

3333
If you use Mercure, keep `caddy:80` in the list to allow the PHP container to request the caddy service.
3434

3535
## Using custom HTTP ports
3636

3737
Use the environment variables `HTTP_PORT`, `HTTPS_PORT` and/or `HTTP3_PORT` to adjust the ports to your needs, e.g.
3838

39-
HTTP_PORT=8000 HTTPS_PORT=4443 HTTP3_PORT=4443 docker-compose up --build
39+
HTTP_PORT=8000 HTTPS_PORT=4443 HTTP3_PORT=4443 docker compose up --build
4040

4141
to access your appplication on [https://localhost:4443](https://localhost:4443).

docs/existing-project.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ Double-check the changes, revert the changes that you don't want to keep:
2424

2525
Build the Docker images:
2626

27-
docker-compose build --no-cache --pull
27+
docker compose build --no-cache --pull
2828

2929
Start the project!
3030

31-
docker-compose up -d
31+
docker compose up -d
3232

3333
Browse `https://localhost`, your Docker configuration is ready!

docs/makefile.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ To use it, create a new `Makefile` file at the root of your project. Copy/paste
55
the content in the template section. To view all the available commands, run `make`.
66

77
For example, in the [getting started section](/README.md#getting-started), the
8-
`docker-compose` commands could be replaced by:
8+
`docker compose` commands could be replaced by:
99

1010
1. Run `make build` to build fresh images
1111
2. Run `make up` (detached mode without logs)
@@ -34,7 +34,7 @@ or use [Cygwin](http://cygwin.com) to use the `make` command. Check out this
3434

3535
```Makefile
3636
# Executables (local)
37-
DOCKER_COMP = docker-compose
37+
DOCKER_COMP = docker compose
3838

3939
# Docker containers
4040
PHP_CONT = $(DOCKER_COMP) exec php

docs/production.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Go into the directory containing your project (`<project-name>`), and start the
6666
SERVER_NAME=your-domain-name.example.com \
6767
APP_SECRET=ChangeMe \
6868
CADDY_MERCURE_JWT_SECRET=ChangeMe \
69-
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d
69+
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d
7070
```
7171

7272
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.
@@ -82,7 +82,7 @@ Alternatively, if you don't want to expose an HTTPS server but only an HTTP one,
8282
SERVER_NAME=:80 \
8383
APP_SECRET=ChangeMe \
8484
CADDY_MERCURE_JWT_SECRET=ChangeMe \
85-
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d
85+
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d
8686
```
8787

8888
## Deploying on Multiple Nodes

docs/troubleshooting.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
## Editing Permissions on Linux
44

5-
If you work on linux and cannot edit some of the project files right after the first installation, you can run `docker-compose run --rm php chown -R $(id -u):$(id -g) .` to set yourself as owner of the project files that were created by the docker container.
5+
If you work on linux and cannot edit some of the project files right after the first installation, you can run `docker compose run --rm php chown -R $(id -u):$(id -g) .` to set yourself as owner of the project files that were created by the docker container.
66

77
## Fix Chrome/Brave SSL
88

99
If you have a TLS trust issues, you can copy the self-signed certificate from Caddy and add it to the trusted certificates :
1010

1111
# Mac
12-
$ docker cp $(docker-compose ps -q caddy):/data/caddy/pki/authorities/local/root.crt /tmp/root.crt && sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain /tmp/root.crt
12+
$ docker cp $(docker compose ps -q caddy):/data/caddy/pki/authorities/local/root.crt /tmp/root.crt && sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain /tmp/root.crt
1313
# Linux
14-
$ docker cp $(docker-compose ps -q caddy):/data/caddy/pki/authorities/local/root.crt /usr/local/share/ca-certificates/root.crt && sudo update-ca-certificates
14+
$ docker cp $(docker compose ps -q caddy):/data/caddy/pki/authorities/local/root.crt /usr/local/share/ca-certificates/root.crt && sudo update-ca-certificates
1515

1616
## HTTPs and Redirects
1717

docs/xdebug.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ services:
5656
Build your image with your fresh new XDebug configuration:
5757
5858
```console
59-
docker-compose -f docker-compose.yml -f docker-compose.debug.yml build
59+
docker compose -f docker-compose.yml -f docker-compose.debug.yml build
6060
```
6161

6262
Then run:
6363

6464
```console
65-
docker-compose -f docker-compose.yml -f docker-compose.debug.yml up -d
65+
docker compose -f docker-compose.yml -f docker-compose.debug.yml up -d
6666
```
6767

6868
## Debugging with Xdebug and PHPStorm
@@ -90,7 +90,7 @@ You can now use the debugger.
9090
Inspect the installation with the following command. The Xdebug version should be displayed.
9191

9292
```console
93-
$ docker-compose exec php php --version
93+
$ docker compose exec php php --version
9494

9595
PHP ...
9696
with Xdebug v3.1.2 ...

0 commit comments

Comments
 (0)