mirror of
https://github.com/Yaslonane/docker_php-apache-postgre.git
synced 2026-05-19 09:47:58 +03:00
---
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
app/
|
||||
postgres_old/
|
||||
postgres/
|
||||
|
||||
+6
-3
@@ -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}
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user