File tree Expand file tree Collapse file tree 5 files changed +29
-11
lines changed Expand file tree Collapse file tree 5 files changed +29
-11
lines changed Original file line number Diff line number Diff line change @@ -82,12 +82,17 @@ ENV PATH="${PATH}:/root/.composer/vendor/bin"
82
82
83
83
WORKDIR /srv/app
84
84
85
+ # Allow to choose skeleton
86
+ ARG SKELETON="symfony/skeleton"
87
+ ENV SKELETON ${SKELETON}
88
+
85
89
# Allow to use development versions of Symfony
86
90
ARG STABILITY="stable"
87
- ENV STABILITY ${STABILITY:-stable }
91
+ ENV STABILITY ${STABILITY}
88
92
89
93
# Allow to select skeleton version
90
94
ARG SYMFONY_VERSION=""
95
+ ENV SYMFONY_VERSION ${SYMFONY_VERSION}
91
96
92
97
# Download the Symfony skeleton and leverage Docker cache layers
93
98
RUN composer create-project "symfony/skeleton ${SYMFONY_VERSION}" . --stability=$STABILITY --prefer-dist --no-dev --no-progress --no-interaction; \
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ services:
7
7
target : symfony_php
8
8
args :
9
9
SYMFONY_VERSION : ${SYMFONY_VERSION:-}
10
+ SKELETON : ${SKELETON:-symfony/skeleton}
10
11
STABILITY : ${STABILITY:-stable}
11
12
restart : unless-stopped
12
13
volumes :
@@ -23,7 +24,6 @@ services:
23
24
MERCURE_URL : ${CADDY_MERCURE_URL:-http://caddy/.well-known/mercure}
24
25
MERCURE_PUBLIC_URL : https://${SERVER_NAME:-localhost}/.well-known/mercure
25
26
MERCURE_JWT_SECRET : ${CADDY_MERCURE_JWT_SECRET:-!ChangeMe!}
26
- SYMFONY_VERSION :
27
27
28
28
caddy :
29
29
build :
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ if [ "$1" = 'php-fpm' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then
17
17
18
18
# The first time volumes are mounted, the project needs to be recreated
19
19
if [ ! -f composer.json ]; then
20
- composer create-project " symfony/skeleton $SYMFONY_VERSION " tmp --stability=$STABILITY --prefer-dist --no-progress --no-interaction
20
+ composer create-project " $SKELETON $SYMFONY_VERSION " tmp --stability=" $STABILITY " --prefer-dist --no-progress --no-interaction
21
21
jq ' .extra.symfony.docker=true' tmp/composer.json > tmp/composer.tmp.json
22
22
rm tmp/composer.json
23
23
mv tmp/composer.tmp.json tmp/composer.json
Original file line number Diff line number Diff line change 1
1
# Build Options
2
2
3
+ ## Selection a Symfony Skeleton
4
+
5
+ By default, Symfony Docker will install the minimalist skeleton.
6
+ To install the [ "website skeleton"] ( https://symfony.com/doc/current/setup.html#creating-symfony-applications ) , use the following command:
7
+
8
+ SKELETON=symfony/website-skeleton docker-compose up --build
9
+
3
10
## Selecting a Specific Symfony Version
4
11
5
12
Use the ` SYMFONY_VERSION ` environment variable to select a specific Symfony version.
6
13
7
14
For instance, use the following command to install Symfony 4.4:
8
15
9
- $ SYMFONY_VERSION=4.4.* docker-compose up --build
16
+ SYMFONY_VERSION=4.4.* docker-compose up --build
17
+
18
+ ## Installing Development Versions of Symfony
10
19
11
20
To install a non-stable version of Symfony, use the ` STABILITY ` environment variable during the build.
12
21
The value must be [ a valid Composer stability option] ( https://getcomposer.org/doc/04-schema.md#minimum-stability ) ) .
13
22
14
23
For instance, use the following command to use the ` master ` branch of Symfony:
15
24
16
- $ STABILITY=dev docker-compose up --build
25
+ STABILITY=dev docker-compose up --build
17
26
18
27
## Customizing the Server Name
19
28
20
29
Use the ` SERVER_NAME ` environment variable to define your custom server name(s).
21
30
22
- $ SERVER_NAME="symfony.wip, caddy:80" docker-compose up --build
31
+ SERVER_NAME="symfony.wip, caddy:80" docker-compose up --build
23
32
24
33
If you use Mercure, keep ` caddy:80 ` in the list to allow the PHP container to request the caddy service.
Original file line number Diff line number Diff line change @@ -51,13 +51,17 @@ services:
51
51
52
52
Then run:
53
53
54
- $ docker-compose -f docker-compose.yml -f docker-compose.debug.yml up -d
54
+ ` ` ` console
55
+ docker-compose -f docker-compose.yml -f docker-compose.debug.yml up -d
56
+ ```
55
57
56
58
## Troubleshooting
57
59
58
60
Inspect the installation with the following command. The requested Xdebug version should be displayed in the output.
59
61
60
- $ docker-compose exec php php --version
61
-
62
- PHP ...
63
- with Xdebug v3.0.4 ...
62
+ ``` console
63
+ $ docker-compose exec php php --version
64
+
65
+ PHP ...
66
+ with Xdebug v3.0.4 ...
67
+ ```
You can’t perform that action at this time.
0 commit comments