one line start up now
This commit is contained in:
@@ -18,8 +18,4 @@ To access the test you will need to write the server name in your `/etc/hosts` f
|
||||
|
||||
Run `docker compose up -d`
|
||||
|
||||
Run `docker compose exec --workdir=/var/www/trial php /usr/local/bin/php ./bin/console cache:clear`
|
||||
Run `docker compose exec --workdir=/var/www/trial php /usr/local/bin/php ./bin/console doctrine:migrations:migrate --no-interaction`
|
||||
Run `docker compose exec --workdir=/var/www/trial php /usr/bin/yarn encore prod`
|
||||
|
||||
To access the test then just simply visit `https://trial:8443` (you need to agree with self-signed cert).
|
||||
|
||||
@@ -34,6 +34,7 @@ class UserAnswerType extends AbstractType
|
||||
$builder
|
||||
->add('answer', ChoiceType::class, [
|
||||
'choices' => $answers,
|
||||
'choice_value' => 'name',
|
||||
'choice_label' => function (?AnswerModel $answerModel): string {
|
||||
return $answerModel->getName();
|
||||
},
|
||||
|
||||
@@ -20,4 +20,10 @@ RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
|
||||
WORKDIR /var/www/trial
|
||||
COPY ./app/composer.json ./app/composer.lock ./app/package.json ./app/yarn.lock ./app/symfony.lock ./
|
||||
|
||||
RUN composer install && npm install -g yarn -y && yarn install
|
||||
RUN composer install && npm install -g yarn -y
|
||||
|
||||
COPY ./docker/fpm/bootstrap.sh /usr/local/bin/
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/bootstrap.sh"]
|
||||
|
||||
|
||||
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd /var/www/trial && \
|
||||
php bin/console cache:clear --env=$APP_ENV && \
|
||||
php bin/console cache:warmup --env=$APP_ENV && \
|
||||
php bin/console doctrine:migrations:migrate --no-interaction --env=$APP_ENV && \
|
||||
yarn install && \
|
||||
yarn encore $APP_ENV && \
|
||||
|
||||
# Start the server
|
||||
/usr/local/bin/docker-php-entrypoint php-fpm
|
||||
Reference in New Issue
Block a user