-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
38 lines (29 loc) · 1.2 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM php:7.3-fpm-alpine3.13
# install additional system dependencies
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
&& apk --update add --no-cache \
bash \
gosu \
multirun \
nginx \
postgresql-dev \
&& mkdir -p /run/nginx \
&& adduser nginx www-data \
&& docker-php-ext-install pdo_pgsql
COPY --from=ghcr.io/jarvusinnovations/tippecanoe-alpine:1.36.0 /usr/local/bin /usr/local/bin
# deploy application to /srv/app
WORKDIR /srv/app
# export app's default HTTP port
EXPOSE 80
# use multirun to manage multiple processes
ENTRYPOINT [ "/docker-entrypoint.sh" ]
# execute Laravel schedule runner every minute
RUN echo "* * * * * cd /srv/app && gosu www-data php artisan schedule:run --verbose --no-interaction" > /etc/crontabs/root
# copy app source folder (less .dockerignore exclusions)
COPY --chown=root:www-data . /srv/app
# ensure permissions on writable directories
RUN chmod -R 775 storage bootstrap/cache \
&& chmod -R g+s storage bootstrap/cache
# install nginx configuration and entrypoint
RUN mv /srv/app/nginx.conf /etc/nginx/conf.d/default.conf \
&& mv /srv/app/docker-entrypoint.sh /docker-entrypoint.sh