Last active
August 15, 2019 13:08
-
-
Save lucassmacedo/5be75e3702571e65bdd13144736a2798 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### | |
# ATENTION: | |
# Replace all occurences of portal with your project's name | |
#### | |
# v2 syntax | |
version: '2' | |
# Named volumes | |
volumes: | |
# Postgres Data | |
portal-postgres-data: | |
driver: local | |
# MySQL Data | |
portal-mysql-data: | |
driver: local | |
# Redis Data | |
portal-redis-data: | |
driver: local | |
services: | |
# Postgres (10.3) | |
postgres: | |
image: postgres:10.3 | |
container_name: portal-postgres | |
volumes: | |
- portal-postgres-data:/var/lib/postgresql/data | |
ports: | |
- "5432:5432" | |
environment: | |
- POSTGRES_PASSWORD=portal | |
- POSTGRES_DB=portal | |
- POSTGRES_USER=portal | |
# MySQL (5.7) | |
mysql: | |
image: mysql:5.7 | |
container_name: portal-mysql | |
volumes: | |
- portal-mysql-data:/var/lib/mysql | |
ports: | |
- "3306:3306" | |
environment: | |
- MYSQL_ROOT_PASSWORD=portal | |
- MYSQL_DATABASE=portal | |
- MYSQL_USER=portal | |
- MYSQL_PASSWORD=portal | |
# Redis | |
cache: | |
image: redis:4.0 | |
container_name: portal-redis | |
command: --appendonly yes | |
volumes: | |
- portal-redis-data:/data | |
ports: | |
- "6379:6379" | |
mailhog: # MailHog - Fake SMTP server (optional). | |
image: mailhog/mailhog:latest | |
ports: | |
- '1025:1025' # Port 1025 => SMTP. | |
- '8025:8025' # Port 8025 => Web dashboard (http://127.0.0.1:8025). | |
# PHP (with Nginx) | |
# you can change from nginx to apache, just change session 'image' | |
app: | |
image: ambientum/php:7.2-nginx | |
container_name: portal-app | |
volumes: | |
- .:/var/www/app | |
ports: | |
- "8055:8080" | |
links: | |
- postgres | |
- cache |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment