prod docker stuff
This commit is contained in:
5
.dockerignore
Normal file
5
.dockerignore
Normal file
@@ -0,0 +1,5 @@
|
||||
.ai
|
||||
.junie
|
||||
.git
|
||||
storage
|
||||
tests
|
||||
14
docker-compose.prod
Normal file
14
docker-compose.prod
Normal file
@@ -0,0 +1,14 @@
|
||||
services:
|
||||
mareike-app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/prod.Dockerfile
|
||||
|
||||
mareike-nginx:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/Dockerfile.nginx
|
||||
depends_on:
|
||||
- mareike-app
|
||||
ports:
|
||||
- 9000:80
|
||||
36
docker/prod.Dockerfile
Normal file
36
docker/prod.Dockerfile
Normal file
@@ -0,0 +1,36 @@
|
||||
FROM php:8.5-fpm-alpine AS base
|
||||
|
||||
ARG UID=1000
|
||||
ARG GID=1000
|
||||
ENV USER=mareike
|
||||
ENV GROUPNAME=$USER
|
||||
|
||||
RUN addgroup -g ${GID} -S ${GROUPNAME} \
|
||||
&& adduser -u ${UID} -D -S -G ${GROUPNAME} ${USER}
|
||||
|
||||
RUN apk add --no-cache \
|
||||
mc \
|
||||
unzip
|
||||
|
||||
COPY --chmod=0755 /docker/php/composer.phar /usr/bin/composer
|
||||
RUN apk add --no-cache --virtual .build-deps \
|
||||
autoconf \
|
||||
build-base \
|
||||
libzip-dev \
|
||||
libpng-dev \
|
||||
libxml2-dev \
|
||||
oniguruma-dev \
|
||||
nodejs \
|
||||
npm
|
||||
|
||||
RUN docker-php-ext-install mysqli pdo pdo_mysql mbstring zip exif pcntl gd
|
||||
|
||||
COPY . /var/www/html
|
||||
WORKDIR /var/www/html
|
||||
RUN composer install --no-dev --optimize-autoloader
|
||||
RUN npm install
|
||||
RUN npm run build
|
||||
|
||||
EXPOSE 9000
|
||||
|
||||
CMD ["php-fpm"]
|
||||
Reference in New Issue
Block a user