diff --git a/.env b/.env index 828ba25..31492bd 100644 --- a/.env +++ b/.env @@ -1,11 +1,11 @@ #postgres -#POSTGRES_PASSWORD=password -#POSTGRES_DB=first_db -#POSTGRES_USER=user -POSTGRES_PASSWORD=MYSQL_ROOT_PASSWORD -POSTGRES_DB=MY_DATABASE -POSTGRES_USER=MYSQL_USER +POSTGRES_PASSWORD=password +POSTGRES_DB=first_db +POSTGRES_USER=user +# POSTGRES_PASSWORD=MYSQL_ROOT_PASSWORD +# POSTGRES_DB=MY_DATABASE +# POSTGRES_USER=MYSQL_USER #pgadmin PGADMIN_DEFAULT_EMAIL=yaslonane@yandex.ru diff --git a/.gitignore b/.gitignore index f83b1b6..233a69a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -app/ \ No newline at end of file +app/ +postgres_old/ +postgres/ diff --git a/docker-compose.yml b/docker-compose.yml index 34efcec..68beb33 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,8 @@ -version: '3.7' +#version: '3.7' services: php-apache: container_name: php-apache + user: www-data:www-data build: context: ./php dockerfile: Dockerfile @@ -11,10 +12,12 @@ services: volumes: - ./app:/var/www/html/ ports: - - 8000:80 + - 80:80 + environment: + - TZ=Europe/Moscow db: container_name: db - image: postgres + image: postgres:15 restart: always environment: POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} diff --git a/php/Dockerfile b/php/Dockerfile index 2011c39..a97e51f 100644 --- a/php/Dockerfile +++ b/php/Dockerfile @@ -2,10 +2,24 @@ FROM php:8.1.22-apache COPY 000-default.conf /etc/apache2/sites-enabled/ +RUN a2enmod rewrite + +RUN service apache2 restart + RUN apt-get update && apt-get install -y libpq-dev git && docker-php-ext-install pdo pdo_pgsql +RUN apt-get install -y libzip-dev && docker-php-ext-install zip + +#install ldap +RUN apt-get install libldap2-dev -y && \ + rm -rf /var/lib/apt/lists/* && \ + docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ && \ + docker-php-ext-install ldap + +#install xdebug RUN pecl install xdebug && docker-php-ext-enable xdebug COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini +#install composer RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer \ No newline at end of file