File tree Expand file tree Collapse file tree 3 files changed +13
-10
lines changed Expand file tree Collapse file tree 3 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,10 @@ SHELL ["/bin/bash", "-c"]
56
56
RUN addgroup -S app && \
57
57
adduser -S app -G app && \
58
58
echo "app ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
59
- WORKDIR /home/app
59
+
60
+ # create working dir
61
+ RUN mkdir /opt/app
62
+ WORKDIR /opt/app
60
63
61
64
# install wait-for-it
62
65
ADD https://github.com/vishnubob/wait-for-it/raw/master/wait-for-it.sh /usr/local/bin/
@@ -82,9 +85,9 @@ RUN composer global require hirak/prestissimo
82
85
RUN yarn config set strict-ssl false && \
83
86
yarn global add cross-env
84
87
85
- # copy user files and make run scripts executable
88
+ # copy home folder and make run scripts executable
86
89
COPY home/app/ .
87
90
RUN find . -name "run-*.sh" -exec chmod -v +x {} \;
88
91
89
92
# run the application
90
- CMD /root /run-dev.sh
93
+ CMD /home/app /run-dev.sh
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ server {
11
11
client_max_body_size 50M;
12
12
13
13
index index.php index.html;
14
- root /home /app/public;
14
+ root /opt /app/public;
15
15
16
16
location / {
17
17
try_files $uri /index.php?$args;
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
echo " Running via DEV script..."
3
- cd /home /app
3
+ cd /opt /app
4
4
5
5
# Make sure Laravel can write its own files
6
- mkdir -p /home /app/storage/logs/
7
- touch /home /app/storage/logs/laravel.log
8
- touch /home /app/storage/logs/worker.log
9
- chown www-data:www-data -R /home /app/storage
10
- chown www-data:www-data -R /home /app/bootstrap/cache
6
+ mkdir -p /opt /app/storage/logs/
7
+ touch /opt /app/storage/logs/laravel.log
8
+ touch /opt /app/storage/logs/worker.log
9
+ chown www-data:www-data -R /opt /app/storage
10
+ chown www-data:www-data -R /opt /app/bootstrap/cache
11
11
12
12
# install dependencies
13
13
composer install --prefer-dist --no-progress --no-interaction
You can’t perform that action at this time.
0 commit comments