diff --git a/app/config/packages/doctrine.yaml b/app/config/packages/doctrine.yaml index 75ec9e8410acc7fa7b17f7c59022e29cb79da9d1..bf5aa40f261c4b9a45213683c22be84f11c81bc5 100644 --- a/app/config/packages/doctrine.yaml +++ b/app/config/packages/doctrine.yaml @@ -1,6 +1,8 @@ doctrine: dbal: - url: '%env(resolve:DATABASE_URL)%' + url: '%env(resolve:DB_URL)%' + user: '%env(resolve:DB_USER)%' + password: '%env(resolve:DB_PASSWORD)%' # IMPORTANT: You MUST configure your server version, # either here or in the DATABASE_URL env var (see .env file) diff --git a/docker-compose.yml b/docker-compose.yml index f4f11445ebd91c6c694463d790a618345119438e..b0e0e0fb514f13269862ac2de45f54cff12972e2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -32,6 +32,7 @@ services: build: context: . dockerfile: docker/App.Dockerfile + container_name: ${APP_NAME}-app ports: - '9000:9000' volumes: diff --git a/docker/App.Dockerfile b/docker/App.Dockerfile index 76b3fbcc75929a6a1f9a924aeb7abfcd5511fbde..99a70ef1f89e378fe6d74551e448505a4c3aca73 100644 --- a/docker/App.Dockerfile +++ b/docker/App.Dockerfile @@ -1,6 +1,6 @@ FROM php:fpm-alpine -WORKDIR app +WORKDIR var/www/project COPY app . diff --git a/docker/App.Dockerfile.dockerignore b/docker/App.Dockerfile.dockerignore index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..468f164f319abbb7c3c80e778c3f779045f75bdf 100644 --- a/docker/App.Dockerfile.dockerignore +++ b/docker/App.Dockerfile.dockerignore @@ -0,0 +1,5 @@ +# --- ignore autogenerated composer files --- +/app/var/ +/app/vendor/ +/app/composer.lock +# ------------------------------------------- \ No newline at end of file diff --git a/docker/nginx/Dockerfile b/docker/nginx/Dockerfile deleted file mode 100644 index a5bbf7c0eab2296ce3f8ba86e478341441e0967c..0000000000000000000000000000000000000000 --- a/docker/nginx/Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -FROM nginx:alpine - -COPY app app - -ADD docker/nginx/default.conf /etc/nginx/conf.d/ \ No newline at end of file diff --git a/docker/nginx/default.conf b/docker/nginx/default.conf deleted file mode 100644 index 3df54dde73b676c90731645b2dbd9316733fe99a..0000000000000000000000000000000000000000 --- a/docker/nginx/default.conf +++ /dev/null @@ -1,16 +0,0 @@ -server { - index index.php; - error_log /var/log/nginx/error.log; - access_log /var/log/nginx/access.log; - root /app/public; - - location ~ \.php$ { - try_files $uri =404; - fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass app:9000; - fastcgi_index index.php; - include fastcgi_params; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_param PATH_INFO $fastcgi_path_info; - } -} diff --git a/docker/php/Dockerfile b/docker/php/Dockerfile deleted file mode 100644 index 76b3fbcc75929a6a1f9a924aeb7abfcd5511fbde..0000000000000000000000000000000000000000 --- a/docker/php/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM php:fpm-alpine - -WORKDIR app - -COPY app . - -RUN apk update && \ - apk add libpq-dev && \ - docker-php-ext-install pdo pdo_pgsql pgsql - -ENV COMPOSER_ALLOW_SUPERUSER=1 -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -RUN composer install - -CMD ["php-fpm"] \ No newline at end of file diff --git a/nginx/default.conf b/nginx/default.conf index 4145474062f6128ffb538d6176171015049aeb31..3a58e907fd217914bb9af4c45f636def99d53258 100644 --- a/nginx/default.conf +++ b/nginx/default.conf @@ -7,7 +7,7 @@ server { try_files $uri /index.php$is_args$args; } location ~ ^/index\.php(/|$) { - fastcgi_pass php82-service:9000; + fastcgi_pass app:9000; fastcgi_split_path_info ^(.+\.php)(/.*)$; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;