This commit is contained in:
2025-01-24 16:23:04 +03:00
parent eabf4dc249
commit 32304cc806
4 changed files with 29 additions and 10 deletions
+6 -6
View File
@@ -1,11 +1,11 @@
#postgres #postgres
#POSTGRES_PASSWORD=password POSTGRES_PASSWORD=password
#POSTGRES_DB=first_db POSTGRES_DB=first_db
#POSTGRES_USER=user POSTGRES_USER=user
POSTGRES_PASSWORD=MYSQL_ROOT_PASSWORD # POSTGRES_PASSWORD=MYSQL_ROOT_PASSWORD
POSTGRES_DB=MY_DATABASE # POSTGRES_DB=MY_DATABASE
POSTGRES_USER=MYSQL_USER # POSTGRES_USER=MYSQL_USER
#pgadmin #pgadmin
PGADMIN_DEFAULT_EMAIL=yaslonane@yandex.ru PGADMIN_DEFAULT_EMAIL=yaslonane@yandex.ru
+2
View File
@@ -1 +1,3 @@
app/ app/
postgres_old/
postgres/
+6 -3
View File
@@ -1,7 +1,8 @@
version: '3.7' #version: '3.7'
services: services:
php-apache: php-apache:
container_name: php-apache container_name: php-apache
user: www-data:www-data
build: build:
context: ./php context: ./php
dockerfile: Dockerfile dockerfile: Dockerfile
@@ -11,10 +12,12 @@ services:
volumes: volumes:
- ./app:/var/www/html/ - ./app:/var/www/html/
ports: ports:
- 8000:80 - 80:80
environment:
- TZ=Europe/Moscow
db: db:
container_name: db container_name: db
image: postgres image: postgres:15
restart: always restart: always
environment: environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
+14
View File
@@ -2,10 +2,24 @@ FROM php:8.1.22-apache
COPY 000-default.conf /etc/apache2/sites-enabled/ 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 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 RUN pecl install xdebug && docker-php-ext-enable xdebug
COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini 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 RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer