Skip to content

A self-hosted media server and file management system

docker config

aminnausin737d0c664ddc
diff --git a/Dockerfile b/Dockerfile
index 91db57e6..ee077799 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
-FROM php:8.4-fpm
+FROM php:8.4-fpm-alpine
RUN apt-get update && apt-get install -y \
build-essential \
@@ -19,8 +19,10 @@ RUN apt-get update && apt-get install -y \
libonig-dev \
libpq-dev \
ffmpeg \
- exiftool \
- && rm -rf /var/lib/apt/lists/*
+ exiftool
+
+# Clear cache
+RUN apt-get clean && rm -rf /var/lib/apt/lists/*
# Install PHP extensions
RUN docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp \
@@ -30,11 +32,14 @@ RUN docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp \
# Install Composer
COPY --from=composer/composer:latest-bin /composer /usr/bin/composer
+# Set working directory
+WORKDIR /var/www
+
# Copy existing application directory contents
-COPY . /var/www/html/
+COPY . /var/www/mediaServer/
-# Set ownership and permissions for the /var/www/html directory to www-data
-RUN chown -R www-data:www-data /var/www/html/
+# Set ownership and permissions for the /var/www/mediaServer directory to www-data
+RUN chown -R www-data:www-data /var/www/mediaServer/
USER www-data
diff --git a/docker/nginx/app.conf b/docker/nginx/app.conf
index 594fa5c2..1135b111 100644
--- a/docker/nginx/app.conf
+++ b/docker/nginx/app.conf
@@ -1,6 +1,6 @@
server {
listen 80;
- server_name app.test;
+ # server_name app.test;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options "nosniff";