Skip to content

Commit 81f2602

Browse files
committed
Support MariaDB
closes feature laradock#21
1 parent ecefee4 commit 81f2602

3 files changed

Lines changed: 33 additions & 14 deletions

File tree

README.md

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# LaraDock
22

3-
[![forthebadge](http://forthebadge.com/images/badges/built-with-love.svg)](http://www.zalt.me)
3+
[![forthebadge](http://forthebadge.com/images/badges/built-by-developers.svg)](http://zalt.me)
44

55

66
LaraDock helps you run your **Laravel** App on **Docker** real quick.
@@ -110,9 +110,10 @@ Running a virtual Container is much faster than running a full virtual Machine.
110110

111111
- PHP (7.0 - 5.6 - 5.5)
112112
- NGINX
113+
- Redis
113114
- MySQL
114115
- PostgreSQL
115-
- Redis
116+
- MariaDB
116117
- Data Volume
117118

118119
Cannot find your container! we would love to have it as well. Consider contributing your container and adding it to this list.
@@ -186,7 +187,7 @@ Note: you can choose your own combination of software's (containers), another ex
186187
docker-compose up -d php nginx postgres redis
187188
```
188189

189-
Supported Containers: `php`, `nginx`, `mysql`, `postgres`, `redis`, `data`.
190+
Supported Containers: `nginx`, `mysql`, `redis`, `postgres`, `mariadb`, `data`, `php`.
190191

191192
<br>
192193
3 - Open your browser and visit your `{Docker-IP}` address (`http://xxx.xxx.xxx.xxx`).
@@ -414,20 +415,12 @@ The Log files are stored in the `docker/logs` directory.
414415

415416
1 - first list the current running containers with `docker ps`
416417

417-
2 - enter any container with:
418-
419-
Example: enter the `php` container
420-
421-
```bash
422-
docker exec -it php bash
423-
```
424-
425-
Example: enter the `nginx` container
418+
2 - enter any container using:
426419

427420
```bash
428-
docker exec -it nginx bash
421+
docker exec -it {container-name-or-id} bash
429422
```
430-
423+
3 - to exit a container, type `exit`.
431424

432425

433426
<br>

docker-compose.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ services:
3232
volumes:
3333
- /var/lib/mysql
3434
- /var/lib/postgres
35+
- /var/lib/mariadb
3536
- /var/lib/redis
3637

3738
### MySQL Container #########################################
@@ -65,6 +66,22 @@ services:
6566
links:
6667
- php
6768

69+
### MariaDB Container #######################################
70+
71+
mariadb:
72+
build: ./mariadb
73+
volumes_from:
74+
- data
75+
ports:
76+
- "3306:3306"
77+
environment:
78+
MYSQL_DATABASE: homestead
79+
MYSQL_USER: homestead
80+
MYSQL_PASSWORD: secret
81+
MYSQL_ROOT_PASSWORD: root
82+
links:
83+
- php
84+
6885
### Redis Container #########################################
6986

7087
redis:

mariadb/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM mariadb:latest
2+
3+
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
4+
5+
VOLUME /var/lib/mariadb
6+
7+
CMD ["mysqld"]
8+
9+
EXPOSE 3306

0 commit comments

Comments
 (0)