Stop gitignoring sample docker compose files

This commit is contained in:
Greg Sarjeant 2025-06-15 15:18:03 -04:00
parent bc483294ce
commit e85c1e39c9
7 changed files with 126 additions and 1 deletions

2
.gitignore vendored
View File

@ -4,7 +4,7 @@
*.sqlite *.sqlite
*.txt *.txt
docker-compose.yml ./docker-compose.yml
init_complete init_complete
storage/upload/css storage/upload/css
scratch scratch

1
docker-compose.yml Symbolic link
View File

@ -0,0 +1 @@
examples/nginx/subfolder/docker-compose.yml

View File

@ -0,0 +1,19 @@
services:
php-apache:
image: php:8.2-apache
container_name: php-apache
ports:
- "80:80"
volumes:
- ./config:/var/www/html/tkr/config
- ./public:/var/www/html/tkr/public
- ./src:/var/www/html/tkr/src
- ./storage:/var/www/html/tkr/storage
- ./templates:/var/www/html/tkr/templates
- ./examples/apache/shared-hosting/.htaccess:/var/www/html/tkr/.htaccess
command: >
bash -c "a2enmod rewrite headers expires &&
apache2-foreground &&
chown -R www-data:www-data /var/www/html/tkr/storage"
restart: unless-stopped

View File

@ -0,0 +1,19 @@
services:
php-apache:
image: php:8.2-apache
container_name: php-apache
ports:
- "80:80"
volumes:
- ./config:/var/www/tkr/config
- ./public:/var/www/tkr/public
- ./src:/var/www/tkr/src
- ./storage:/var/www/tkr/storage
- ./templates:/var/www/tkr/templates
- ./examples/apache/vps/root/tkr.my-domain.com.conf:/etc/apache2/sites-enabled/tkr.my-domain.com.conf
command: >
bash -c "a2enmod rewrite headers expires &&
apache2-foreground &&
chown -R www-data:www-data /var/www/tkr/storage"
restart: unless-stopped

View File

@ -0,0 +1,20 @@
services:
php-apache:
image: php:8.2-apache
container_name: php-apache
ports:
- "80:80"
volumes:
- ./config:/var/www/tkr/config
- ./public:/var/www/tkr/public
- ./src:/var/www/tkr/src
- ./storage:/var/www/tkr/storage
- ./templates:/var/www/tkr/templates
- ./examples/apache/vps/subfolder/my-domain.com.conf:/etc/apache2/sites-enabled/my-domain.com.conf
command: >
bash -c "a2enmod rewrite headers expires &&
a2dissite 000-default &&
apache2-foreground &&
chown -R www-data:www-data /var/www/tkr/storage"
restart: unless-stopped

View File

@ -0,0 +1,33 @@
services:
nginx:
image: nginx:alpine
container_name: nginx-server
ports:
- "80:80"
volumes:
- ./public:/var/www/tkr/public
- ./examples/nginx/root/nginx.conf:/etc/nginx/conf.d/default.conf
depends_on:
- php
restart: unless-stopped
php:
image: php:8.2-fpm-alpine
container_name: php-fpm
volumes:
- ./config:/var/www/tkr/config
- ./public:/var/www/tkr/public
- ./src:/var/www/tkr/src
- ./storage:/var/www/tkr/storage
- ./templates:/var/www/tkr/templates
command: >
sh -c "
chown -R www-data:www-data /var/www/tkr/storage &&
chmod -R 775 /var/www/tkr/storage &&
php-fpm
"
restart: unless-stopped
volumes:
src:
driver: local

View File

@ -0,0 +1,33 @@
services:
nginx:
image: nginx:alpine
container_name: nginx-server
ports:
- "80:80"
volumes:
- ./public:/var/www/tkr/public
- ./examples/nginx/subfolder/nginx.conf:/etc/nginx/conf.d/default.conf
depends_on:
- php
restart: unless-stopped
php:
image: php:8.2-fpm-alpine
container_name: php-fpm
volumes:
- ./config:/var/www/tkr/config
- ./public:/var/www/tkr/public
- ./src:/var/www/tkr/src
- ./storage:/var/www/tkr/storage
- ./templates:/var/www/tkr/templates
command: >
sh -c "
chown -R www-data:www-data /var/www/tkr/storage &&
chmod -R 775 /var/www/tkr/storage &&
php-fpm
"
restart: unless-stopped
volumes:
src:
driver: local