Create Application Container to hold App code
This commit is contained in:
parent
1574231a80
commit
4d8a798224
17
README.md
17
README.md
@ -87,7 +87,8 @@ docker-compose up nginx mysql redis
|
|||||||
- Memcached
|
- Memcached
|
||||||
- Beanstalkd
|
- Beanstalkd
|
||||||
- Beanstalkd Console
|
- Beanstalkd Console
|
||||||
- Data Volume
|
- Data Volume *(Databases Data Container)*
|
||||||
|
- Application *(Application Code Container)*
|
||||||
- Workspace (includes: `Git`, `Vim`, `nano`, `PHP-CLI 7.0`, `cURL`)
|
- Workspace (includes: `Git`, `Vim`, `nano`, `PHP-CLI 7.0`, `cURL`)
|
||||||
|
|
||||||
>If you can't find your container, build it yourself and add it to this list. Contributions are welcomed :)
|
>If you can't find your container, build it yourself and add it to this list. Contributions are welcomed :)
|
||||||
@ -186,21 +187,15 @@ DB_HOST=xxx.xxx.xxx.xxx
|
|||||||
<br>
|
<br>
|
||||||
*Make sure you are in the `docker` folder before running the `docker-compose` command.*
|
*Make sure you are in the `docker` folder before running the `docker-compose` command.*
|
||||||
|
|
||||||
> Running PHP-FPM, NGINX, MySQL, Redis and the Data Containers:
|
**Example:** Running NGINX, MySQL, Redis and the workspace:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker-compose up -d nginx mysql redis
|
docker-compose up -d nginx mysql redis Workspace
|
||||||
```
|
```
|
||||||
|
*Note: the PHP-FPM, Application and Data Containers will automatically run.*
|
||||||
|
|
||||||
Note: you can choose your own combination of software's (containers), another example:
|
|
||||||
|
|
||||||
> Running PHP-FPM, NGINX, Postgres, Memcached and the Data Containers:
|
Supported Containers: `nginx`, `workspace`, `mysql`, `redis`, `postgres`, `mariadb`, `memcached`, `beanstalkd`, `beanstalkd-console`, `data`, `php-fpm`, `application`.
|
||||||
|
|
||||||
```bash
|
|
||||||
docker-compose up -d nginx postgres memcached
|
|
||||||
```
|
|
||||||
|
|
||||||
Supported Containers: `nginx`, `mysql`, `redis`, `postgres`, `mariadb`, `memcached`, `beanstalkd`, `beanstalkd-console`, `data`, `php-fpm`, `workspace`.
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
3 - Open your browser and visit your `{Docker-IP}` address (`http://xxx.xxx.xxx.xxx`).
|
3 - Open your browser and visit your `{Docker-IP}` address (`http://xxx.xxx.xxx.xxx`).
|
||||||
|
7
application/Dockerfile
Normal file
7
application/Dockerfile
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
FROM debian:jessie
|
||||||
|
|
||||||
|
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
|
|
||||||
|
WORKDIR /var/www/laravel
|
||||||
|
|
||||||
|
CMD ["true"]
|
@ -2,33 +2,27 @@ version: '2'
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
### Nginx Server Container ##################################
|
|
||||||
|
|
||||||
nginx:
|
|
||||||
build: ./nginx
|
|
||||||
volumes_from:
|
|
||||||
- php-fpm
|
|
||||||
volumes:
|
|
||||||
- ./logs/nginx/:/var/log/nginx
|
|
||||||
ports:
|
|
||||||
- "80:80"
|
|
||||||
- "443:443"
|
|
||||||
links:
|
|
||||||
- php-fpm
|
|
||||||
|
|
||||||
### PHP-FPM Container #######################################
|
### PHP-FPM Container #######################################
|
||||||
|
|
||||||
php-fpm:
|
php-fpm:
|
||||||
build:
|
build:
|
||||||
context: ./php-fpm
|
context: ./php-fpm
|
||||||
dockerfile: Dockerfile-70
|
dockerfile: Dockerfile-70
|
||||||
|
volumes_from:
|
||||||
|
- application
|
||||||
volumes:
|
volumes:
|
||||||
- ../:/var/www/laravel
|
|
||||||
- ./logs/php/:/usr/local/var/log
|
- ./logs/php/:/usr/local/var/log
|
||||||
expose:
|
expose:
|
||||||
- "9000"
|
- "9000"
|
||||||
|
|
||||||
### DATA Container ##########################################
|
### Laravel Application Code Container ######################
|
||||||
|
|
||||||
|
application:
|
||||||
|
build: ./application
|
||||||
|
volumes:
|
||||||
|
- ../:/var/www/laravel
|
||||||
|
|
||||||
|
### Databases Data Container ################################
|
||||||
|
|
||||||
data:
|
data:
|
||||||
build: ./data
|
build: ./data
|
||||||
@ -39,6 +33,20 @@ services:
|
|||||||
- /var/lib/redis
|
- /var/lib/redis
|
||||||
- /var/lib/memcached
|
- /var/lib/memcached
|
||||||
|
|
||||||
|
### Nginx Server Container ##################################
|
||||||
|
|
||||||
|
nginx:
|
||||||
|
build: ./nginx
|
||||||
|
volumes_from:
|
||||||
|
- application
|
||||||
|
volumes:
|
||||||
|
- ./logs/nginx/:/var/log/nginx
|
||||||
|
ports:
|
||||||
|
- "80:80"
|
||||||
|
- "443:443"
|
||||||
|
links:
|
||||||
|
- php-fpm
|
||||||
|
|
||||||
### MySQL Container #########################################
|
### MySQL Container #########################################
|
||||||
|
|
||||||
mysql:
|
mysql:
|
||||||
@ -132,7 +140,7 @@ services:
|
|||||||
workspace:
|
workspace:
|
||||||
build: ./workspace
|
build: ./workspace
|
||||||
volumes_from:
|
volumes_from:
|
||||||
- data
|
- application
|
||||||
tty: true
|
tty: true
|
||||||
|
|
||||||
### Add more Containers below ###############################
|
### Add more Containers below ###############################
|
||||||
|
Loading…
Reference in New Issue
Block a user