Add a development environment
This commit is contained in:
parent
26a779ade0
commit
9eb433a8ed
20
dev/nginx/nginx.conf
Normal file
20
dev/nginx/nginx.conf
Normal file
@ -0,0 +1,20 @@
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
|
||||
server_name slovocast;
|
||||
|
||||
root /var/www/slovocast/public;
|
||||
index index.php index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
}
|
||||
|
||||
location ~* \.php$ {
|
||||
fastcgi_pass php:9000;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
||||
}
|
||||
}
|
9
dev/php/Dockerfile
Normal file
9
dev/php/Dockerfile
Normal file
@ -0,0 +1,9 @@
|
||||
FROM php:8.3-fpm
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y libonig-dev \
|
||||
zip \
|
||||
libzip-dev \
|
||||
libpng-dev
|
||||
|
||||
RUN docker-php-ext-install pdo pdo_mysql mbstring gd zip
|
29
docker-compose.yml
Normal file
29
docker-compose.yml
Normal file
@ -0,0 +1,29 @@
|
||||
version: '3.8'
|
||||
services:
|
||||
php:
|
||||
build:
|
||||
dockerfile: 'dev/php/Dockerfile'
|
||||
volumes:
|
||||
- './app:/var/www/slovocast'
|
||||
depends_on:
|
||||
- mariadb
|
||||
nginx:
|
||||
image: nginx:latest
|
||||
volumes:
|
||||
- './app:/var/www/slovocast'
|
||||
- './dev/nginx:/etc/nginx/conf.d'
|
||||
ports:
|
||||
- "8080:80"
|
||||
depends_on:
|
||||
- php
|
||||
mariadb:
|
||||
image: mariadb:10.9
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: "P4ssword!"
|
||||
MYSQL_DATABASE: "slovocast"
|
||||
MYSQL_USER: "slovocast"
|
||||
MYSQL_PASSWORD: "slovocast"
|
||||
volumes:
|
||||
- "slovocast_data:/var/lib/mysql"
|
||||
volumes:
|
||||
slovocast_data:
|
Loading…
Reference in New Issue
Block a user