Compare commits
18 Commits
Author | SHA1 | Date | |
---|---|---|---|
380178e6fa | |||
be64b54606 | |||
cbeeb48aa1 | |||
7e2814168a | |||
5e9ae56a7f | |||
5d98e78dba | |||
c5d1116333 | |||
5594c53e03 | |||
44045f85e6 | |||
fc31a2415c | |||
a42f62c626 | |||
3e4a5edc64 | |||
9289c1b6c0 | |||
3f157a3277 | |||
f732bb283b | |||
ca4aeada08 | |||
3d54d68aa1 | |||
a0153810c6 |
@ -7,9 +7,7 @@
|
|||||||
LaraDock能够帮你在**Docker**上快速搭建**Laravel**应用。
|
LaraDock能够帮你在**Docker**上快速搭建**Laravel**应用。
|
||||||
<br>
|
<br>
|
||||||
就像Laravel Homestead一样,但是Docker替换了Vagrant。
|
就像Laravel Homestead一样,但是Docker替换了Vagrant。
|
||||||
>先在Docker上使用LaraDock,然后再学习它们。
|
> 先在使用 LaraDock,然后再学习它们。
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
## 目录
|
## 目录
|
||||||
|
27
README.md
27
README.md
@ -61,6 +61,7 @@ Laradock is configured to run Laravel Apps by default, and it can be modifyed to
|
|||||||
- [Access workspace via ssh](#Workspace-ssh)
|
- [Access workspace via ssh](#Workspace-ssh)
|
||||||
- [MySQL access from host](#MySQL-access-from-host)
|
- [MySQL access from host](#MySQL-access-from-host)
|
||||||
- [MySQL root access](#MySQL-root-access)
|
- [MySQL root access](#MySQL-root-access)
|
||||||
|
- [Change MySQL port](#Change-MySQL-port)
|
||||||
- [Use custom Domain](#Use-custom-Domain)
|
- [Use custom Domain](#Use-custom-Domain)
|
||||||
- [Enable Global Composer Build Install](#Enable-Global-Composer-Build-Install)
|
- [Enable Global Composer Build Install](#Enable-Global-Composer-Build-Install)
|
||||||
- [Install Prestissimo](#Install-Prestissimo)
|
- [Install Prestissimo](#Install-Prestissimo)
|
||||||
@ -287,7 +288,13 @@ git clone https://github.com/LaraDock/laradock.git
|
|||||||
```
|
```
|
||||||
Do the same for each project `project2.conf`, `project3.conf`,...
|
Do the same for each project `project2.conf`, `project3.conf`,...
|
||||||
|
|
||||||
6 - Create your project Databases **To Be Continue..**
|
6 - Add the domains to the **hosts** files.
|
||||||
|
|
||||||
|
```
|
||||||
|
127.0.0.1 project1.dev
|
||||||
|
```
|
||||||
|
|
||||||
|
7 - Create your project Databases. Right now you have to do it manually by entering your DB container, until we automate it soon.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1158,6 +1165,17 @@ The default username and password for the root mysql user are `root` and `root `
|
|||||||
4 - Run any commands `show databases`, `show tables`, `select * from.....`.
|
4 - Run any commands `show databases`, `show tables`, `select * from.....`.
|
||||||
|
|
||||||
|
|
||||||
|
<a name="Change-MySQL-port"></a>
|
||||||
|
### Change MySQL port
|
||||||
|
|
||||||
|
Modify the `mysql/my.cnf` file to set your port number, `1234` is used as an example.
|
||||||
|
|
||||||
|
```
|
||||||
|
[mysqld]
|
||||||
|
port=1234
|
||||||
|
```
|
||||||
|
|
||||||
|
If you need <a href="#MySQL-access-from-host">MySQL access from your host</a>, do not forget to change the internal port number (`"3306:3306"` -> `"3306:1234"`) in the docker-compose config file.
|
||||||
|
|
||||||
<a name="Use-custom-Domain"></a>
|
<a name="Use-custom-Domain"></a>
|
||||||
### Use custom Domain (instead of the Docker IP)
|
### Use custom Domain (instead of the Docker IP)
|
||||||
@ -1351,8 +1369,11 @@ Make sure the ports for the services that you are trying to run (80, 3306, etc.)
|
|||||||
|
|
||||||
This error is sometimes happens because your Laravel application isn't running on the container localhost IP (Which is 127.0.0.1). Steps to fix it:
|
This error is sometimes happens because your Laravel application isn't running on the container localhost IP (Which is 127.0.0.1). Steps to fix it:
|
||||||
|
|
||||||
1. Check your running Laravel application IP by dumping `Request::ip()` variable using `dd(Request::ip())` anywhere on your application. The result is the IP of your Laravel container.
|
* Option A
|
||||||
2. Change the `DB_HOST` variable on env with the IP that you received from previous step.
|
1. Check your running Laravel application IP by dumping `Request::ip()` variable using `dd(Request::ip())` anywhere on your application. The result is the IP of your Laravel container.
|
||||||
|
2. Change the `DB_HOST` variable on env with the IP that you received from previous step.
|
||||||
|
* Option B
|
||||||
|
1. Change the `DB_HOST` value to the same name as the mysql docker container. The Laradock docker-compose file currently has this as `mysql`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ services:
|
|||||||
mariadb:
|
mariadb:
|
||||||
build: ./mariadb
|
build: ./mariadb
|
||||||
volumes:
|
volumes:
|
||||||
- mariadb
|
- mysql:/var/lib/mysql
|
||||||
ports:
|
ports:
|
||||||
- "3306:3306"
|
- "3306:3306"
|
||||||
environment:
|
environment:
|
||||||
@ -150,6 +150,19 @@ services:
|
|||||||
POSTGRES_USER: homestead
|
POSTGRES_USER: homestead
|
||||||
POSTGRES_PASSWORD: secret
|
POSTGRES_PASSWORD: secret
|
||||||
|
|
||||||
|
### PostgreSQL PostGis Container ############################
|
||||||
|
|
||||||
|
postgres-postgis:
|
||||||
|
build: ./postgres-postgis
|
||||||
|
volumes:
|
||||||
|
- postgres:/var/lib/postgresql/data
|
||||||
|
ports:
|
||||||
|
- "5432:5432"
|
||||||
|
environment:
|
||||||
|
POSTGRES_DB: homestead
|
||||||
|
POSTGRES_USER: homestead
|
||||||
|
POSTGRES_PASSWORD: secret
|
||||||
|
|
||||||
### Neo4j Container #########################################
|
### Neo4j Container #########################################
|
||||||
|
|
||||||
neo4j:
|
neo4j:
|
||||||
@ -267,8 +280,6 @@ services:
|
|||||||
MYSQL_USER: homestead
|
MYSQL_USER: homestead
|
||||||
MYSQL_PASSWORD: secret
|
MYSQL_PASSWORD: secret
|
||||||
MYSQL_ROOT_PASSWORD: root
|
MYSQL_ROOT_PASSWORD: root
|
||||||
volumes:
|
|
||||||
- phpmyadmin
|
|
||||||
ports:
|
ports:
|
||||||
- "8080:80"
|
- "8080:80"
|
||||||
links:
|
links:
|
||||||
|
5
postgres-postgis/Dockerfile
Normal file
5
postgres-postgis/Dockerfile
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
FROM mdillon/postgis:latest
|
||||||
|
|
||||||
|
CMD ["postgres"]
|
||||||
|
|
||||||
|
EXPOSE 5432
|
@ -10,7 +10,7 @@
|
|||||||
# https://hub.docker.com/r/laradock/workspace/tags/
|
# https://hub.docker.com/r/laradock/workspace/tags/
|
||||||
#
|
#
|
||||||
|
|
||||||
FROM laradock/workspace:1.1
|
FROM laradock/workspace:1.2
|
||||||
|
|
||||||
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
|
|
||||||
@ -191,6 +191,7 @@ ARG INSTALL_YARN=false
|
|||||||
ENV INSTALL_YARN ${INSTALL_YARN}
|
ENV INSTALL_YARN ${INSTALL_YARN}
|
||||||
|
|
||||||
RUN if [ ${INSTALL_YARN} = true ]; then \
|
RUN if [ ${INSTALL_YARN} = true ]; then \
|
||||||
|
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" && \
|
||||||
curl -o- -L https://yarnpkg.com/install.sh | bash && \
|
curl -o- -L https://yarnpkg.com/install.sh | bash && \
|
||||||
echo "" >> ~/.bashrc && \
|
echo "" >> ~/.bashrc && \
|
||||||
echo 'export PATH="$HOME/.yarn/bin:$PATH"' >> ~/.bashrc \
|
echo 'export PATH="$HOME/.yarn/bin:$PATH"' >> ~/.bashrc \
|
||||||
|
Reference in New Issue
Block a user