Updated dockerfile, and config

pull/4/head
Manuel Aranda Rosales 2024-05-21 12:51:05 +02:00
parent aa946396be
commit 59545b4fed
3 changed files with 12 additions and 18 deletions

View File

@ -30,9 +30,17 @@ docker ps
Y deberiamos ver algo parecido a :
- ogcore-nginx-1
- ogcore-php-1
- ogcore-database-1
- ogcore-nginx
- ogcore-php
- ogcore-database
### Instalamos dependencias
```sh
docker exec ogcore-php composer install
docker exec ogcore-php symfony console lexik:jwt:generate-keypair --overwrite
```
Comprobamos, que el contenedor de Nginx, tiene el puerto 8080 levantado correctamente, asi que tan solo tendremos que
acceder a la siguiente URL:

View File

@ -16,6 +16,7 @@ security:
entry_point: jwt
json_login:
check_path: auth
provider: app_user_provider
username_path: username
password_path: password
success_handler: lexik_jwt_authentication.handler.authentication_success

View File

@ -1,7 +1,6 @@
FROM php:8.3-fpm-alpine
ENV COMPOSER_ALLOW_SUPERUSER=1
# Install PHP extensions
RUN docker-php-ext-install pdo mysqli pdo_mysql opcache
@ -24,17 +23,3 @@ RUN install-php-extensions sockets
RUN apk add --no-cache bash \
&& curl -1sLf 'https://dl.cloudsmith.io/public/symfony/stable/setup.alpine.sh' | bash \
&& apk add symfony-cli
# Expose webroot
VOLUME /var/www/html
WORKDIR /var/www/html
COPY . /var/www/html
RUN cd /var/www/html \
&& composer install --no-interaction --no-progress --prefer-dist --no-scripts \
&& php bin/console cache:clear --no-warmup \
&& php bin/console cache:warmup \
&& php bin/console assets:install public \
&& php bin/console lexik:jwt:generate-keypair --overwrite \
&& mkdir -p var/cache var/log \
&& chmod -R 777 var/cache var/log