Skip to content

Instantly share code, notes, and snippets.

@rochamarcelo
Created July 19, 2020 13:04
Show Gist options
  • Save rochamarcelo/57ec366be4b734a9cf5bf82d461e6067 to your computer and use it in GitHub Desktop.
Save rochamarcelo/57ec366be4b734a9cf5bf82d461e6067 to your computer and use it in GitHub Desktop.
CakePHP docker setup
version: "3.1"
services:
php-fpm:
image: webdevops/php-nginx:7.4
container_name: myapp-webserver
working_dir: /app
volumes:
- ./:/app
environment:
- WEB_DOCUMENT_ROOT=/app/webroot
ports:
- "80:80"
mysql:
image: mysql:5.6
container_name: myapp-mysql
working_dir: /app
volumes:
- .:/app
- ./tmp/data/mysql_db:/var/lib/mysql
env_file:
- mysql.env
command: mysqld --character-set-server=utf8 --init-connect='SET NAMES UTF8;'
ports:
- "3306:3306"
## DO NOT USE THESE VALUES ON PRODUCTION
## ONLY USE THIS FOR YOUR LOCAL ENVIRONMENT
MYSQL_ROOT_PASSWORD=password
MYSQL_DATABASE=my_app
MYSQL_USER=my_user
MYSQL_PASSWORD=password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment