This commit is contained in:
andrey
2023-08-08 15:22:39 +03:00
commit 8c73e86a10
5 changed files with 50 additions and 0 deletions
View File
+3
View File
@@ -0,0 +1,3 @@
FROM httpd:alpine
RUN apk update && apk upgrade
+3
View File
@@ -0,0 +1,3 @@
<?php
echo "test";
phpinfo();
+27
View File
@@ -0,0 +1,27 @@
version: '2'
services:
php-apache-environment:
container_name: php-apache
build:
context: ./php
dockerfile: Dockerfile
depends_on:
- db
volumes:
- ./app:/var/www/html/
ports:
- 8000:80
db:
container_name: db
image: postgres
restart: always
environment:
POSTGRES_PASSWORD: MYSQL_ROOT_PASSWORD
POSTGRES_DB: MY_DATABASE
POSTGRES_USER: MYSQL_USER
#adminer:
# container_name: adminer
# image: adminer
# restart: always
# ports:
# - 8080:8080
+17
View File
@@ -0,0 +1,17 @@
FROM php:8.1.22-apache
RUN apt-get update && apt-get install -y libpq-dev && docker-php-ext-install pdo pdo_pgsql
#FROM php:fpm-alpine
#RUN apk update; \
# apk upgrade;
#RUN apk add --n0-cache curl git build-base zlib-dev oniguruma-dev autoconf bash
#COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
#RUN docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql \
# && docker-php-ext-install pgsql pdo_pgsql