Skip to content

Commit 06d4600

Browse files
committed
change workdir
1 parent a65af5f commit 06d4600

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ SHELL ["/bin/bash", "-c"]
5656
RUN addgroup -S app && \
5757
adduser -S app -G app && \
5858
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
6063

6164
# install wait-for-it
6265
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
8285
RUN yarn config set strict-ssl false && \
8386
yarn global add cross-env
8487

85-
# copy user files and make run scripts executable
88+
# copy home folder and make run scripts executable
8689
COPY home/app/ .
8790
RUN find . -name "run-*.sh" -exec chmod -v +x {} \;
8891

8992
# run the application
90-
CMD /root/run-dev.sh
93+
CMD /home/app/run-dev.sh

etc/nginx/conf.d/default.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ server {
1111
client_max_body_size 50M;
1212

1313
index index.php index.html;
14-
root /home/app/public;
14+
root /opt/app/public;
1515

1616
location / {
1717
try_files $uri /index.php?$args;

home/app/run-dev.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/usr/bin/env bash
22
echo "Running via DEV script..."
3-
cd /home/app
3+
cd /opt/app
44

55
# 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
1111

1212
# install dependencies
1313
composer install --prefer-dist --no-progress --no-interaction

0 commit comments

Comments
 (0)