prod docker stuff

This commit is contained in:
tux
2026-04-26 17:46:21 +02:00
parent 7b2f2de1f0
commit 2444aab204
3 changed files with 55 additions and 0 deletions

5
.dockerignore Normal file
View File

@@ -0,0 +1,5 @@
.ai
.junie
.git
storage
tests

14
docker-compose.prod Normal file
View 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
View 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"]