File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,9 @@ RUN yarn config set strict-ssl false && \
107
107
COPY ./home/app/ /home/app/
108
108
COPY ./root/.bashrc /root/
109
109
RUN find /home/app -name "run-*.sh" -exec chmod -v +x {} \;
110
+ RUN chmod +x /home/app/entrypoint.sh
110
111
111
112
# run the application
113
+ ENTRYPOINT bash /home/app/entrypoint.sh
112
114
CMD /home/app/run-prod.sh
113
115
EXPOSE 8080
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ echo " Running entrypoint script..."
3
+
4
+ set -e
5
+
6
+ # make sure Laravel can write its own files
7
+ mkdir -p /opt/app/storage/logs/
8
+ touch /opt/app/storage/logs/laravel.log
9
+ touch /opt/app/storage/logs/worker.log
10
+
11
+ chown www-data:www-data -R /opt/app/storage
12
+ chown www-data:www-data -R /opt/app/bootstrap/cache
13
+
14
+ # create storage symlink
15
+ echo " create storage symlink..."
16
+ su www-data -s /bin/sh -c " php artisan storage:link -q"
17
+
18
+ # startup commands
19
+ php /usr/local/bin/startup_commands.php | bash
20
+
21
+ cd /opt/app
22
+
23
+ " $@ "
You can’t perform that action at this time.
0 commit comments