Skip to content
This repository was archived by the owner on Mar 15, 2023. It is now read-only.

Commit 34c1f2f

Browse files
committed
Update
1 parent 66e0038 commit 34c1f2f

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,17 @@ RUN apt-get install --yes nodejs build-essential > /dev/null
5050
# Create system user to run Composer and Artisan Commands
5151
RUN useradd -G www-data,root -u 1234 -d /home/laravel laravel
5252
RUN mkdir -p /home/laravel/.composer
53-
RUN chown -R laravel:laravel /home/laravel
5453

5554
# Start script
56-
COPY start.sh /usr/local/bin/start
57-
RUN chmod u+x /usr/local/bin/start
58-
RUN chown -R laravel:laravel /usr/local/bin/start
55+
COPY start.sh /home/laravel/start
56+
57+
# Permission
58+
RUN chown -R laravel:laravel /home/laravel
59+
RUN chmod +x /home/laravel/start
5960

6061
# Set working directory
6162
WORKDIR /var/www
6263

6364
USER laravel
6465

65-
CMD ["/usr/local/bin/start"]
66+
CMD ["/home/laravel/start"]

start.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ role=${CONTAINER_ROLE:-app}
66

77
if [ "$role" = "app" ]; then
88

9-
exit 0
9+
echo "Running the main app..."
10+
php-fpm -F
1011

1112
elif [ "$role" = "queue" ]; then
1213

@@ -15,6 +16,7 @@ elif [ "$role" = "queue" ]; then
1516

1617
elif [ "$role" = "scheduler" ]; then
1718

19+
echo "Running the scheduler every minute..."
1820
while [ true ]
1921
do
2022
php /var/www/artisan schedule:run --verbose --no-interaction &

0 commit comments

Comments
 (0)