mirror of
https://github.com/nickyeoman/docker-compose-cookbooks.git
synced 2026-09-04 02:46:23 +00:00
updating docs for phpcontainer
This commit is contained in:
@@ -17,10 +17,8 @@ These compose files make a few assumptions:
|
|||||||
## 📚 Workflow
|
## 📚 Workflow
|
||||||
The intended workflow is as follows:
|
The intended workflow is as follows:
|
||||||
|
|
||||||
1. Clone the cookbook repository locally ```git clone git@github.com:nickyeoman/docker-compose-cookbooks.git /git-repos/docker-compose-cookbooks```
|
1. Clone the cookbook repository locally ```git clone git@github.com:nickyeoman/docker-compose-cookbooks.git /docker-compose-cookbooks```
|
||||||
2. Change to the directory ```cd /git-repos/docker-compose-cookbooks```
|
2. Change to the directory ```cd /git-repos/docker-compose-cookbooks```
|
||||||
3. Run the helper cli wizard: ```bash helper.bash```
|
|
||||||
4. Commit the new project to git.
|
|
||||||
|
|
||||||
You will likely want to override a number of things in the project folder, such as networks.
|
You will likely want to override a number of things in the project folder, such as networks.
|
||||||
|
|
||||||
@@ -29,10 +27,6 @@ You will likely want to override a number of things in the project folder, such
|
|||||||
Here is an example of how your project's docker-compose file might look:
|
Here is an example of how your project's docker-compose file might look:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
networks:
|
|
||||||
proxy:
|
|
||||||
external: true
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
proxy:
|
proxy:
|
||||||
extends:
|
extends:
|
||||||
@@ -42,12 +36,20 @@ services:
|
|||||||
- .env
|
- .env
|
||||||
networks:
|
networks:
|
||||||
- proxy
|
- proxy
|
||||||
|
|
||||||
|
networks:
|
||||||
|
proxy:
|
||||||
|
external: true
|
||||||
```
|
```
|
||||||
|
|
||||||
with the .env file:
|
with the .env file:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
COOKBOOK=/git-repos/docker-compose-cookbooks
|
COOKBOOK=/docker-compose-cookbooks
|
||||||
|
COMPOSE_PROJECT_NAME=www-4lt-ca
|
||||||
|
TZ=America/Vancouver
|
||||||
|
VOL_CONFIG_PATH=/websites/www-4lt-ca/config
|
||||||
|
VOL_PATH=/websites/www-4lt-ca/data
|
||||||
```
|
```
|
||||||
|
|
||||||
Now use ```docker compose up -d``` to start the project.
|
Now use ```docker compose up -d``` to start the project.
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
services:
|
services:
|
||||||
|
|
||||||
mariadb:
|
mariadb:
|
||||||
image: ${MARIADB_IMAGE:-mariadb:latest}
|
image: ${MARIADB_IMAGE:-mariadb:latest}
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
services:
|
services:
|
||||||
|
|
||||||
mariadb:
|
mariadb:
|
||||||
extends:
|
extends:
|
||||||
file: ${COOKBOOK}/mariadb/docker-compose.yml
|
file: ${COOKBOOK}/mariadb/docker-compose.yml
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
version: '3.4'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
php-apache:
|
php-apache:
|
||||||
extends:
|
extends:
|
||||||
file: ${COOKBOOK}/phpcontainer/docker-compose.yml
|
file: ${COOKBOOK}/phpcontainer/docker-compose.yml
|
||||||
@@ -8,3 +7,4 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- "./project:/data"
|
- "./project:/data"
|
||||||
- "./config/php.ini:/usr/local/etc/php/php.ini"
|
- "./config/php.ini:/usr/local/etc/php/php.ini"
|
||||||
|
|
||||||
Reference in New Issue
Block a user