1
0
Fork 0
mirror of https://github.com/fernwerker/ownDynDNS.git synced 2025-07-10 06:05:13 +02:00

add docker functionality

This commit is contained in:
NiiWiiCamo 2024-02-13 14:46:01 +01:00
parent 058a32533b
commit 28f384ee92
10 changed files with 46 additions and 0 deletions

24
docker-compose.yml Normal file
View file

@ -0,0 +1,24 @@
version: "3"
services:
nginx:
build:
context: .
dockerfile: nginx/Dockerfile
image: nginx:alpine
ports:
- "8180:80"
volumes:
- data:/var/www/html
php:
build:
context: .
dockerfile: php/Dockerfile
depends_on:
- nginx
volumes:
- data:/var/www/html
volumes:
data:

7
nginx/Dockerfile Normal file
View file

@ -0,0 +1,7 @@
FROM nginx:alpine
RUN mkdir -p /var/www/html/src
COPY nginx/default.conf /etc/nginx/conf.d/
COPY ./data/src/ /var/www/html/src
COPY ./data/update.php /var/www/html
COPY ./data/.env.dist /var/www/html/.env
VOLUME /var/www/html

13
nginx/default.conf Normal file
View file

@ -0,0 +1,13 @@
server {
listen 0.0.0.0:80;
root /var/www/html;
location / {
return 302 https://github.com/NiiWiiCamo/ownDynDNS;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass php:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
}
}

2
php/Dockerfile Normal file
View file

@ -0,0 +1,2 @@
FROM php:fpm-alpine
VOLUME /var/www/html