-
-
Save JonTheNiceGuy/e1a39477e3b756b46bc5b9c25f3253d5 to your computer and use it in GitHub Desktop.
Docker files for HuMo-genealogy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
db: | |
image: mysql:5.7 | |
volumes: | |
- ./mysql:/var/lib/mysql | |
restart: always | |
environment: | |
- "MYSQL_ROOT_PASSWORD=" | |
- "MYSQL_ALLOW_EMPTY_PASSWORD=true" | |
- "MYSQL_DATABASE=humo-gen" | |
expose: | |
- 3306 | |
nginx: | |
build: | |
context: . | |
dockerfile: nginx/Dockerfile | |
restart: always | |
ports: | |
- 127.0.0.1:1980:80 | |
fpm: | |
build: | |
context: . | |
dockerfile: fpm/Dockerfile | |
restart: always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM php:8.0.12-fpm | |
RUN docker-php-ext-install pdo pdo_mysql | |
# content | |
ADD --chown=www-data:www-data public /var/www/html | |
RUN sed -i /var/www/html/include/db_login.php -e "s/ 'localhost');/ 'db');/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM nginx:latest | |
RUN echo 'server {' > /etc/nginx/conf.d/default.conf ; \ | |
echo ' index index.php index.html;' >> /etc/nginx/conf.d/default.conf ; \ | |
echo ' server_name _;' >> /etc/nginx/conf.d/default.conf ; \ | |
echo ' error_log /proc/self/fd/2;' >> /etc/nginx/conf.d/default.conf ; \ | |
echo ' access_log /proc/self/fd/1;' >> /etc/nginx/conf.d/default.conf ; \ | |
echo ' root /var/www/html;' >> /etc/nginx/conf.d/default.conf ; \ | |
echo ' location ~ \.php$ {' >> /etc/nginx/conf.d/default.conf ; \ | |
echo ' try_files $uri =404;' >> /etc/nginx/conf.d/default.conf ; \ | |
echo ' fastcgi_split_path_info ^(.+\.php)(/.+)$;' >> /etc/nginx/conf.d/default.conf ; \ | |
echo ' fastcgi_pass fpm:9000;' >> /etc/nginx/conf.d/default.conf ; \ | |
echo ' fastcgi_index index.php;' >> /etc/nginx/conf.d/default.conf ; \ | |
echo ' include fastcgi_params;' >> /etc/nginx/conf.d/default.conf ; \ | |
echo ' fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;' >> /etc/nginx/conf.d/default.conf ; \ | |
echo ' fastcgi_param PATH_INFO $fastcgi_path_info;' >> /etc/nginx/conf.d/default.conf ; \ | |
echo ' }' >> /etc/nginx/conf.d/default.conf ; \ | |
echo '}' >> /etc/nginx/conf.d/default.conf | |
ADD public /var/www/html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment