Last active
December 9, 2017 22:08
-
-
Save hernandev/872ae480d9fef9484b92716da8421c56 to your computer and use it in GitHub Desktop.
dockervel
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
# declare docker-compose version. | |
version: "3" | |
# declare named volumes. | |
volumes: | |
# mysql data. | |
mysql-data: | |
driver: local | |
# redis data. | |
redis-data: | |
driver: local | |
# declare services. | |
services: | |
# mysql. | |
mysql: | |
# docker image name. | |
image: mysql:5.7 | |
# volumes. | |
volumes: | |
- mysql-data:/var/lib/mysql | |
# env vars. | |
environment: | |
- MYSQL_ROOT_PASSWORD=dockervel | |
- MYSQL_DATABASE=dockervel | |
- MYSQL_USER=dockervel | |
- MYSQL_PASSWORD=dockervel | |
# map ports. | |
ports: | |
- 3306:3306 | |
# redis | |
redis: | |
# docker image name. | |
image: redis:3.2-alpine | |
# volumes | |
volumes: | |
- redis-data:/data | |
# ports | |
ports: | |
- 6379:6379 | |
# app | |
app: | |
# docker image. | |
image: ambientum/php:7.1-nginx | |
# volumes. | |
volumes: | |
- .:/var/www/app | |
# links. | |
links: | |
- mysql:mysql | |
- redis:cache | |
# ports. | |
ports: | |
- 8080:8080 | |
# queue | |
queue: | |
# restart automatically. | |
restart: unless-stopped | |
# docker image. | |
image: ambientum/php:7.1 | |
# command to run. | |
command: php artisan queue:work --tries=3 | |
# volumes. | |
volumes: | |
- .:/var/www/app | |
# links. | |
links: | |
- mysql:mysql | |
- redis:cache |
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
# from. | |
FROM debian:jessie | |
# maintainer. | |
MAINTAINER Diego Hernandes <[email protected]> | |
# update package database. | |
RUN apt -y update | |
# upgrade packages. | |
RUN apt -y upgrade | |
# install mysql client. | |
RUN apt install -y mysql-client | |
# add custom mysql config. | |
ADD my.cnf /etc/mysql/my.cnf | |
# add dotdeb key (remove this example). | |
ADD https://www.dotdeb.org/dotdeb.gpg /root/dotdeb.gpg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment