Skip to content

Commit ea134d2

Browse files
committed
update
add env phpWrapper use env VOLUMES_DRIVER
1 parent e07c8a8 commit ea134d2

File tree

6 files changed

+28
-19
lines changed

6 files changed

+28
-19
lines changed

.gitignore

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
# Ignore everything
2-
/*
1+
.env
32

4-
#
5-
!.gitignore
6-
!.editorconfig
7-
!README.md
8-
!docker-compose.yml
9-
!/Logs/
10-
!/Dockerfiles/
11-
!php7wrapper
3+
.DS_Store
4+
.vscode/*

Database/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

docker-compose.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ services:
99
ports:
1010
- 9000:9000
1111
volumes:
12-
- ./:/var/www:delegated
12+
- ${VOLUMES_DRIVER}:/var/www:delegated
1313
- ./Dockerfiles/php-fpm/php.ini:/usr/local/etc/php/php.ini:ro
1414
- ./Dockerfiles/php-fpm/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini:ro
1515
deploy:
@@ -37,7 +37,7 @@ services:
3737
- 80:80
3838
- 443:443
3939
volumes:
40-
- ./:/var/www:delegated
40+
- ${VOLUMES_DRIVER}:/var/www:delegated
4141
- ./Logs:/var/log/nginx:delegated
4242
- ./Dockerfiles/nginx/sites-enabled:/etc/nginx/sites-enabled:ro
4343
depends_on:
@@ -63,14 +63,13 @@ services:
6363
ports:
6464
- "3000"
6565
volumes:
66-
- ./:/var/www:delegated
66+
- ${VOLUMES_DRIVER}:/var/www:delegated
6767
depends_on:
6868
- FPM
6969
restart: on-failure
7070
extra_hosts:
7171
- "localhost:172.16.1.50"
7272
# - "any-your-project-domain:172.16.1.50"
73-
tty: true
7473
networks:
7574
app_net:
7675
ipv4_address: 172.16.1.30

env-example

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#
2+
# DockerDev Variables
3+
#
4+
5+
# e.g. /Users/USER_NAME/Projects
6+
VOLUMES_DRIVER=

php7wrapper

Lines changed: 0 additions & 5 deletions
This file was deleted.

phpWrapper

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
# https://gist.github.com/mihow/9c7f559807069a03e302605691f85572
4+
# Local .env
5+
if [ -f .env ]; then
6+
# Load Environment Variables
7+
export $(cat .env | grep -v '#' | awk '/=/ {print $1}')
8+
# For instance, will be example_kaggle_key
9+
echo $KAGGLE_KEY
10+
fi
11+
12+
docker run --rm -i \
13+
-v $VOLUMES_DRIVER:/var/www \
14+
cscolabear/7.2-fpm php "$@"

0 commit comments

Comments
 (0)