Skip to content

Commit df20583

Browse files
committed
fixing mandatory lumen folders
1 parent 69873ab commit df20583

File tree

4 files changed

+40
-4
lines changed

4 files changed

+40
-4
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,14 @@ Run [Composer](https://getcomposer.org/) to install all dependencies.
5151
composer install --prefer-dist
5252
```
5353

54-
Ensure the folder ./storage are with all rights to save log and cache (alread set in composer install, but ...)
54+
Ensure the composer install create the cache folders and give then permissions in ./storage, if don't you'll have to create and give permitions yourself:
5555
```sh
56-
chmod -R 777 ./storage
56+
mkdir storage/framework \
57+
&& mkdir storage/framework/cache \
58+
&& mkdir storage/framework/cache/data \
59+
&& mkdir storage/framework/sessions \
60+
&& mkdir storage/framework/views \
61+
&& chmod -R 777 ./storage
5762
```
5863

5964
To check the build for this project look at ./ops/docker/dev folder.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
},
3636
"scripts": {
3737
"post-install-cmd": [
38-
"chmod -R 777 storage"
38+
"./ops/folders.sh"
3939
],
4040
"checkall" : [
4141
"@lint",

ops/docker/prod/php-fpm/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ RUN tar -xvf /usr/src/newrelic-php5-9.21.0.311-linux.tar.gz -C /usr/src && \
2424

2525
COPY . /var/www/html
2626

27-
2827
WORKDIR /var/www/html
2928

3029
EXPOSE 9000

ops/folders.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/sh
2+
3+
DIR1="storage/framework"
4+
DIR2="storage/framework/cache"
5+
DIR3="storage/framework/cache/data"
6+
DIR4="storage/framework/sessions"
7+
DIR5="storage/framework/views"
8+
9+
10+
if [ ! -d "$DIR1" ]; then
11+
mkdir "$DIR1"
12+
echo "folder $DIR1 created"
13+
fi
14+
if [ ! -d "$DIR2" ]; then
15+
mkdir "$DIR2"
16+
echo "folder $DIR2 created"
17+
fi
18+
if [ ! -d "$DIR3" ]; then
19+
mkdir "$DIR3"
20+
echo "folder $DIR3 created"
21+
fi
22+
if [ ! -d "$DIR4" ]; then
23+
mkdir "$DIR4"
24+
echo "folder $DIR4 created"
25+
fi
26+
if [ ! -d "$DIR5" ]; then
27+
mkdir "$DIR5"
28+
echo "folder $DIR5 created"
29+
fi
30+
31+
chmod -R 777 storage
32+
echo "permissions set on storage"

0 commit comments

Comments
 (0)