Skip to content

Instantly share code, notes, and snippets.

@joselfonseca
Created April 26, 2019 19:24
Show Gist options
  • Select an option

  • Save joselfonseca/665940f6e256b64ccffd314531e67366 to your computer and use it in GitHub Desktop.

Select an option

Save joselfonseca/665940f6e256b64ccffd314531e67366 to your computer and use it in GitHub Desktop.
docker-compose options in PHP for live coding
version: '3'
services:
mysql:
image: mysql:5.6
environment:
MYSQL_ROOT_PASSWORD: secret
MYSQL_DATABASE: swimply
volumes:
- ./docker/mysql/data/:/var/lib/mysql
ports:
- 3306:3306
redis:
image: redis:5-alpine
ports:
- 6379:6379
version: '3'
services:
app:
image: joselfonsecadt/nginx-php7.3:latest
volumes:
- ./:/var/www/html
- ./docker/nginx/certs/:/etc/ssl/certs/
- ./docker/nginx/conf/default.conf:/etc/nginx/sites-available/default
- ./docker/nginx/conf/ssl-params.conf:/etc/nginx/ssl-params.conf
links:
- mysql
- redis
ports:
- 443:443
mysql:
image: mysql:5.6
environment:
MYSQL_ROOT_PASSWORD: secret
MYSQL_DATABASE: swimply
volumes:
- ./docker/mysql/data/:/var/lib/mysql
ports:
- 3306:3306
redis:
image: redis:5-alpine
ports:
- 6379:6379
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment