Skip to content

Instantly share code, notes, and snippets.

@dinacel
Created April 21, 2017 16:10
Show Gist options
  • Save dinacel/1e8be3fdfb0600158053205bd16c4f7a to your computer and use it in GitHub Desktop.
Save dinacel/1e8be3fdfb0600158053205bd16c4f7a to your computer and use it in GitHub Desktop.
version: '2'
services:
wordpress:
build:
context: ./
dockerfile: ./Dockerfile
links:
- db:mysql
- mailhog
ports:
- 80:80
domainname: foo.com
hostname: foo
volumes:
- ./public:/var/www/html
environment:
WORDPRESS_DB_PASSWORD: example
depends_on:
- mailhog
mailhog:
image: mailhog/mailhog
ports:
- 1025:1025
- 8025:8025
db:
image: mariadb
environment:
MYSQL_ROOT_PASSWORD: example
FROM wordpress
RUN curl --location --output /usr/local/bin/mhsendmail https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 && \
chmod +x /usr/local/bin/mhsendmail
RUN echo 'sendmail_path="/usr/local/bin/mhsendmail --smtp-addr=mailhog:1025 --from=no-reply@docker.dev"' > /usr/local/etc/php/conf.d/mailhog.ini
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment