Commit f5949dac authored by David's avatar David

Reorganizing

parent a8f4ea31
......@@ -4,3 +4,5 @@ db_root_password.txt
db_data/
wp_themes/
wp_plugins/
logs/
wordpress/
\ No newline at end of file
version: '3.1'
services:
nginx:
image: nginx:latest
ports:
- '8080:80'
volumes:
- ./nginx:/etc/nginx/conf.d
- ./logs/nginx:/var/log/nginx
- ./wordpress:/var/www/html
networks:
- wp_net
wordpress:
# Not using my custom image, because building snuffleupagus is proving to be more irritating than it's worth
#image: gitlab-registry.light.kow.is/kowis-projects/wordpress-container
image: wordpress:php7.3
image: wordpress:php7.3-fpm
restart: always
volumes:
- ./wp_themes:/var/www/html/wp-content/themes/
- ./wp_plugins:/var/www/html/wp-content/plugins/
ports:
- 8080:80
- ./wordpress:/var/www/html
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD_FILE: /run/secrets/db_password
WORDPRESS_DB_NAME: wordpress
secrets:
- db_password
- db_password
networks:
- wp_net
- db_net
db:
image: mariadb:10
restart: always
volumes:
- ./db_data:/var/lib/mysql
- ./db_data:/var/lib/mysql
environment:
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD_FILE: /run/secrets/db_password
MYSQL_ROOT_PASSWORD_FILE: /run/secrets/db_root_password
secrets:
- db_root_password
- db_password
- db_root_password
- db_password
networks:
- db_net
secrets:
db_password:
file: db_password.txt
db_root_password:
file: db_root_password.txt
networks:
db_net:
wp_net:
\ No newline at end of file
server {
listen 80;
server_name david.kow.is;
root /var/www/html;
index index.php;
access_log /var/log/nginx/wp-access.log;
error_log /var/log/nginx/wp-error.log;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass wordpress:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment