Initial setup

This commit is contained in:
Alexis
2026-07-13 19:25:35 +02:00
parent b390c687c9
commit 5c765c1dbe
13 changed files with 146 additions and 1 deletions

4
.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
/sites/**
!/sites/.gitkeep
/mysql/

10
Caddyfile Normal file
View File

@@ -0,0 +1,10 @@
http://adila-one-page.localhost {
root * /var/www/adila-one-page/public
encode gzip
php_fastcgi php83:9000
file_server
}
http://pma.localhost {
reverse_proxy phpmyadmin:80
}

View File

@@ -1 +1,11 @@
# docked-wp
# Docked WP
Docker-based setup for Wordpress-based (and other platforms) web dev.
## Caddy
```shell
# Reload config
$> sudo docker compose exec caddy caddy reload --config /etc/caddy/Caddyfile
# Validate config
$> sudo docker compose run --rm caddy caddy validate --config /etc/caddy/Caddyfile
```

65
compose.yaml Normal file
View File

@@ -0,0 +1,65 @@
services:
caddy:
image: caddy:2-alpine
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- ./sites:/var/www
- caddy_data:/data
- caddy_config:/config
networks: [web]
php81:
build:
context: ./php/8.1
dockerfile: Dockerfile
volumes:
- ./sites:/var/www
networks: [web]
php82:
build:
context: ./php/8.2
dockerfile: Dockerfile
volumes:
- ./sites:/var/www
networks: [web]
php83:
build:
context: ./php/8.3
dockerfile: Dockerfile
volumes:
- ./sites:/var/www
networks: [web]
php84:
build:
context: ./php/8.4
dockerfile: Dockerfile
volumes:
- ./sites:/var/www
networks: [web]
mariadb:
image: mariadb:11
environment:
MARIADB_ROOT_PASSWORD: root
volumes:
- ./mysql:/var/lib/mysql
networks: [web]
phpmyadmin:
image: phpmyadmin:latest
environment:
PMA_HOST: mariadb
networks: [web]
networks:
web:
volumes:
caddy_data:
caddy_config:

8
php/8.1/Dockerfile Normal file
View File

@@ -0,0 +1,8 @@
FROM php:8.1-fpm-alpine
RUN apk add --no-cache \
libpng-dev libzip-dev libjpeg-turbo-dev freetype-dev icu-dev libxml2-dev oniguruma-dev curl-dev \
&& docker-php-ext-configure gd --with-jpeg --with-freetype \
&& docker-php-ext-install -j$(nproc) gd mysqli pdo pdo_mysql zip intl exif mbstring curl xml soap bcmath opcache
COPY php.ini /usr/local/etc/php/conf.d/custom.ini

6
php/8.1/php.ini Normal file
View File

@@ -0,0 +1,6 @@
upload_max_filesize = 128M
post_max_size = 128M
memory_limit = 256M
max_execution_time = 300
opcache.enable = 1
opcache.validate_timestamps = 1

8
php/8.2/Dockerfile Normal file
View File

@@ -0,0 +1,8 @@
FROM php:8.2-fpm-alpine
RUN apk add --no-cache \
libpng-dev libzip-dev libjpeg-turbo-dev freetype-dev icu-dev libxml2-dev oniguruma-dev curl-dev \
&& docker-php-ext-configure gd --with-jpeg --with-freetype \
&& docker-php-ext-install -j$(nproc) gd mysqli pdo pdo_mysql zip intl exif mbstring curl xml soap bcmath opcache
COPY php.ini /usr/local/etc/php/conf.d/custom.ini

6
php/8.2/php.ini Normal file
View File

@@ -0,0 +1,6 @@
upload_max_filesize = 128M
post_max_size = 128M
memory_limit = 256M
max_execution_time = 300
opcache.enable = 1
opcache.validate_timestamps = 1

8
php/8.3/Dockerfile Normal file
View File

@@ -0,0 +1,8 @@
FROM php:8.3-fpm-alpine
RUN apk add --no-cache \
libpng-dev libzip-dev libjpeg-turbo-dev freetype-dev icu-dev libxml2-dev oniguruma-dev curl-dev \
&& docker-php-ext-configure gd --with-jpeg --with-freetype \
&& docker-php-ext-install -j$(nproc) gd mysqli pdo pdo_mysql zip intl exif mbstring curl xml soap bcmath opcache
COPY php.ini /usr/local/etc/php/conf.d/custom.ini

6
php/8.3/php.ini Normal file
View File

@@ -0,0 +1,6 @@
upload_max_filesize = 128M
post_max_size = 128M
memory_limit = 256M
max_execution_time = 300
opcache.enable = 1
opcache.validate_timestamps = 1

8
php/8.4/Dockerfile Normal file
View File

@@ -0,0 +1,8 @@
FROM php:8.4-fpm-alpine
RUN apk add --no-cache \
libpng-dev libzip-dev libjpeg-turbo-dev freetype-dev icu-dev libxml2-dev oniguruma-dev curl-dev \
&& docker-php-ext-configure gd --with-jpeg --with-freetype \
&& docker-php-ext-install -j$(nproc) gd mysqli pdo pdo_mysql zip intl exif mbstring curl xml soap bcmath opcache
COPY php.ini /usr/local/etc/php/conf.d/custom.ini

6
php/8.4/php.ini Normal file
View File

@@ -0,0 +1,6 @@
upload_max_filesize = 128M
post_max_size = 128M
memory_limit = 256M
max_execution_time = 300
opcache.enable = 1
opcache.validate_timestamps = 1

0
sites/.gitkeep Normal file
View File