Skip to content

Commit b9a8c27

Browse files
committed
wip
1 parent 4a10c5b commit b9a8c27

File tree

7 files changed

+21
-15
lines changed

7 files changed

+21
-15
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ 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 up` (the logs will be displayed in the current shell)
10+
2. Run `docker compose up` (the logs will be displayed in the current shell)
1111
3. Open `https://localhost` in your favorite web browser and [accept the auto-generated TLS certificate](https://stackoverflow.com/a/15076602/1352334)
1212

1313
## Features

docker/php/docker-entrypoint.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ if [ "$1" = 'php-fpm' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then
1717

1818
# The first time volumes are mounted, the project needs to be recreated
1919
if [ ! -f composer.json ]; then
20+
CREATION=1
2021
composer create-project "$SKELETON $SYMFONY_VERSION" tmp --stability="$STABILITY" --prefer-dist --no-progress --no-interaction --no-install
2122

2223
cd tmp
@@ -35,6 +36,11 @@ if [ "$1" = 'php-fpm' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then
3536
composer install --prefer-dist --no-progress --no-interaction
3637

3738
if grep -q ^DATABASE_URL= .env; then
39+
if [ -z "$CREATION" ]; then
40+
echo "Please stop and start docker compose again to finish the installation."
41+
sleep infinity
42+
fi
43+
3844
echo "Waiting for db to be ready..."
3945
ATTEMPTS_LEFT_TO_REACH_DATABASE=60
4046
until [ $ATTEMPTS_LEFT_TO_REACH_DATABASE -eq 0 ] || DATABASE_ERROR=$(bin/console dbal:run-sql "SELECT 1" 2>&1); do

docs/build.md

Lines changed: 4 additions & 4 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,12 +22,12 @@ 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.wip, caddy:80" docker-compose up --build
31+
SERVER_NAME="symfony.wip, 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.

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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ services:
5252
Then run:
5353
5454
```console
55-
docker-compose -f docker-compose.yml -f docker-compose.debug.yml up -d
55+
docker compose -f docker-compose.yml -f docker-compose.debug.yml up -d
5656
```
5757

5858
## Troubleshooting
5959

6060
Inspect the installation with the following command. The requested Xdebug version should be displayed in the output.
6161

6262
```console
63-
$ docker-compose exec php php --version
63+
$ docker compose exec php php --version
6464

6565
PHP ...
6666
with Xdebug v3.0.4 ...

0 commit comments

Comments
 (0)