Browse Source

fix db driver and conf

olinox14 2 years ago
parent
commit
b218c37932
2 changed files with 7 additions and 2 deletions
  1. 1 1
      api/.env
  2. 6 1
      docker/api/Dockerfile

+ 1 - 1
api/.env

@@ -22,7 +22,7 @@ APP_SECRET=e5d6295bff11cbca1abbb10deeb7d74c
 # Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
 # For a PostgreSQL database, use: "postgresql://db_user:db_password@127.0.0.1:5432/db_name?serverVersion=11&charset=utf8"
 # IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
-DATABASE_URL=postgresql://admin:WWDlSQ9IfUctQelFyNyZ@db:5432/<db>?serverVersion=13&charset=utf8
+DATABASE_URL=postgresql://admin:uNdQjtoThCFVjHlTpKKb@db:5432/ossatura?serverVersion=13&charset=utf8
 ###< doctrine/doctrine-bundle ###
 
 ###> nelmio/cors-bundle ###

+ 6 - 1
docker/api/Dockerfile

@@ -1,7 +1,7 @@
 FROM php:8.2-apache
 
 RUN apt-get update && apt-get install -y --fix-missing \
-    apt-utils build-essential xorg wget bash gnupg zip nano git;
+    apt-utils build-essential xorg wget bash gnupg zip nano git libpq5 libpq-dev;
 
 COPY /docker/api/vhost.conf /etc/apache2/sites-available/vhost.conf
 
@@ -13,6 +13,11 @@ RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"; \
     php -r "unlink('composer-setup.php');"; \
     mv composer.phar /usr/local/bin/composer;
 
+RUN docker-php-ext-install pdo pdo_pgsql \
+    && apt-get autoremove --purge -y libpq-dev \
+    && apt-get clean \
+    && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
+
 ######## XDebug ########
 RUN pecl install xdebug; \
     docker-php-ext-enable xdebug;