Skip to content

Instantly share code, notes, and snippets.

@frv-dev
Created August 10, 2020 02:42
Show Gist options
  • Save frv-dev/2f582f69d73ed7b8074aaf6111e21178 to your computer and use it in GitHub Desktop.
Save frv-dev/2f582f69d73ed7b8074aaf6111e21178 to your computer and use it in GitHub Desktop.
Docker config for PHP 7.4 development with e-mail and MySQL.
version: "3"
services:
web:
build: .
container_name: app-web
ports:
- 8080:8080
working_dir: /home/web
volumes:
- .:/home/web
command: sh ./docker/web/entrypoint.sh
links:
- mail
- db
mail:
image: mailhog/mailhog
container_name: app-mailhog
ports:
- 1025:1025
- 8025:8025
db:
image: mysql:8
container_name: app-db
volumes:
- ./docker/db/mysql:/var/lib/mysql
ports:
- "3306:3306"
environment:
- MYSQL_DATABASE=app_db
- MYSQL_ROOT_PASSWORD=root
FROM php:7.4-alpine
RUN docker-php-ext-install pdo pdo_mysql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment