Skip to content

Commit 382705b

Browse files
authored
Merge pull request #624 from Laravel-Backpack/add-entrypoints-example
add entrypoints example
2 parents 4f3bfee + cd7fea2 commit 382705b

File tree

5 files changed

+20
-19
lines changed

5 files changed

+20
-19
lines changed

Dockerfile

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1-
FROM node:22.4.1 as node_base
2-
31
FROM serversideup/php:8.3-fpm-nginx as base
42

5-
COPY --chown=www-data:www-data ./docker/infra/certs /etc/nginx/certs
3+
ENV S6_CMD_WAIT_FOR_SERVICES=1
4+
5+
COPY --chmod=755 ./entrypoint.d/ /etc/entrypoint.d/
6+
COPY ./docker/infra/certs /etc/nginx/certs
7+
8+
USER root
9+
10+
# run the docker-php-serversideup-s6-init script
11+
RUN docker-php-serversideup-s6-init
12+
13+
USER www-data
614

715
# uncomment if you need to install chrome. eg. for spatie browser shot projects.
816
#USER root
@@ -31,19 +39,13 @@ ARG GROUP_ID
3139
# Switch to root so we can set the user ID and group ID
3240
USER root
3341

34-
ENV S6_CMD_WAIT_FOR_SERVICES=1
35-
36-
# make npm & node available in the container
37-
COPY --chown=www-data:www-data --from=node_base /usr/local/bin /usr/local/bin
38-
COPY --chown=www-data:www-data --from=node_base /usr/local/lib/node_modules/npm /usr/local/lib/node_modules/npm
39-
40-
41-
COPY --chmod=755 ./docker/entrypoint.d/ /etc/entrypoint.d
42-
4342
RUN docker-php-serversideup-set-id www-data $USER_ID:$GROUP_ID && \
4443
docker-php-serversideup-set-file-permissions --owner $USER_ID:$GROUP_ID --service nginx
4544

46-
# run the docker-php-serversideup-s6-init script
47-
RUN docker-php-serversideup-s6-init
45+
46+
# make npm & node available in the container
47+
COPY --chown=www-data:www-data --from=node:22.4.1 /usr/local/bin /usr/local/bin
48+
49+
COPY --chown=www-data:www-data --from=node:22.4.1 /usr/local/lib/node_modules/npm /usr/local/lib/node_modules/npm
4850

4951
USER www-data

docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ services:
1010
volumes:
1111
- .:/var/www/html/
1212
restart: unless-stopped
13-
working_dir: /var/www/html
1413
networks:
1514
- development
1615
ports:

docker/entrypoint.d/49-before-laravel-automations.sh

Lines changed: 0 additions & 3 deletions
This file was deleted.

entrypoint.d/51-after.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
echo "hey there after running laravel automations"

install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ rm -rf vendor/backpack
1818

1919
composer install --no-interaction --prefer-source --ansi
2020

21-
php artisan key:generate
21+
php artisan key:generate
2222

2323
bash start.sh

0 commit comments

Comments
 (0)