Skip to content

Instantly share code, notes, and snippets.

@itsff
Last active January 6, 2016 19:30
Show Gist options
  • Save itsff/4f2d2b19312103990a3c to your computer and use it in GitHub Desktop.
Save itsff/4f2d2b19312103990a3c to your computer and use it in GitHub Desktop.
Sample docker-compose.yml
# Reverse proxy for routing web traffic
web_proxy:
image: dmp1ce/nginx-proxy-letsencrypt
restart: always
ports:
- 80:80
- 443:443
volumes:
- /var/run/docker.sock:/tmp/docker.sock
- ~/sites/certs:/etc/nginx/certs
# Shared MySQL database for use with wordpress blogs
# and any sites that may need it
db:
image: mariadb
restart: always
environment:
- MYSQL_ROOT_PASSWORD=the_secret_pass
volumes:
- ~/sites/data/db:/var/lib/mysql
# Example wordpress blog
wp_filipfracz_net:
image: wordpress
restart: always
links:
- db:mysql
environment:
- WORDPRESS_DB_NAME=wp_filipfracz_net
- WORDPRESS_DB_PASSWORD=the_secret_pass
- VIRTUAL_HOST=filipfracz.net
- LETSENCRYPT_HOST=filipfracz.net # free SSL !
- [email protected]
ports:
- 8000:80
volumes:
- ~/sites/data/wp_filipfracz_net:/var/www/html
# Another wordpress blog
wp_anea_basically_me:
image: wordpress
restart: always
links:
- db:mysql
environment:
- WORDPRESS_DB_NAME=wp_anea_basically_me
- WORDPRESS_DB_PASSWORD=the_secret_pass
- VIRTUAL_HOST=anea.basically.me
- LETSENCRYPT_HOST=anea.basically.me # free SSL !
- [email protected]
ports:
- 8001:80
volumes:
- ~/sites/data/wp_anea_basically_me:/var/www/html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment