Skip to content

Instantly share code, notes, and snippets.

@abiosoft
Created September 18, 2016 16:16
Show Gist options
  • Save abiosoft/92fa7575d255ef49ec614485e78ed3c5 to your computer and use it in GitHub Desktop.
Save abiosoft/92fa7575d255ef49ec614485e78ed3c5 to your computer and use it in GitHub Desktop.
Caddy wordpress docker-compose
:80
root /usr/src/wordpress
gzip
fastcgi / wordpress:9000 php
rewrite {
if {path} not_match ^\/wp-admin
to {path} {path}/ /index.php?_url={uri}
}
log stdout
errors stderr
version: '2'
services:
db:
image: mysql
container_name: mysql
volumes:
- "./.data:/var/lib/mysql"
restart: always
environment:
MYSQL_ROOT_PASSWORD: wordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
wordpress:
depends_on:
- db
image: wordpress:fpm
container_name: wordpress
links:
- db
restart: always
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_PASSWORD: wordpress
volumes:
- "/usr/src/wordpress"
- "./php.ini:/usr/local/etc/php/conf.d/custom.ini"
server:
image: abiosoft/caddy
container_name: caddy
restart: always
ports:
- "80:80"
- "443:443"
links:
- wordpress
volumes:
- "./Caddyfile:/etc/Caddyfile"
volumes_from:
- wordpress
memory_limit = 32M
upload_max_filesize = 24M
post_max_size = 32M
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment