t commited on
Commit ·
9b4b03c
1
Parent(s): 787552f
msg
Browse files- Dockerfile +1 -10
- nginx.conf +11 -6
- php-fpm.conf +0 -1
Dockerfile
CHANGED
|
@@ -10,26 +10,18 @@ RUN apt update && apt install -y \
|
|
| 10 |
php8.1-sqlite3 php8.1-intl php8.1-opcache php8.1-readline php8.1-fileinfo \
|
| 11 |
curl unzip passwd
|
| 12 |
|
| 13 |
-
# Timezone
|
| 14 |
ENV TZ=Asia/Kolkata
|
| 15 |
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
| 16 |
|
| 17 |
-
# Admin user for cockpit
|
| 18 |
RUN useradd -m admin && echo "admin:admin" | chpasswd && usermod -aG sudo admin
|
| 19 |
|
| 20 |
-
|
| 21 |
-
RUN mkdir -p /run/cockpit
|
| 22 |
|
| 23 |
-
# Nextcloud dir
|
| 24 |
-
RUN mkdir -p /var/www/nextcloud
|
| 25 |
-
|
| 26 |
-
# Install Nextcloud
|
| 27 |
RUN curl -L https://download.nextcloud.com/server/releases/latest.zip -o nextcloud.zip \
|
| 28 |
&& unzip nextcloud.zip -d /var/www \
|
| 29 |
&& rm nextcloud.zip \
|
| 30 |
&& chown -R www-data:www-data /var/www/nextcloud
|
| 31 |
|
| 32 |
-
# Copy config files
|
| 33 |
COPY nginx.conf /etc/nginx/nginx.conf
|
| 34 |
COPY php-fpm.conf /etc/php/8.1/fpm/pool.d/www.conf
|
| 35 |
COPY supervisor.conf /etc/supervisor/conf.d/supervisor.conf
|
|
@@ -40,4 +32,3 @@ EXPOSE 7860
|
|
| 40 |
|
| 41 |
CMD ["/start.sh"]
|
| 42 |
|
| 43 |
-
|
|
|
|
| 10 |
php8.1-sqlite3 php8.1-intl php8.1-opcache php8.1-readline php8.1-fileinfo \
|
| 11 |
curl unzip passwd
|
| 12 |
|
|
|
|
| 13 |
ENV TZ=Asia/Kolkata
|
| 14 |
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
| 15 |
|
|
|
|
| 16 |
RUN useradd -m admin && echo "admin:admin" | chpasswd && usermod -aG sudo admin
|
| 17 |
|
| 18 |
+
RUN mkdir -p /var/www/nextcloud /run/php /run/cockpit
|
|
|
|
| 19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
RUN curl -L https://download.nextcloud.com/server/releases/latest.zip -o nextcloud.zip \
|
| 21 |
&& unzip nextcloud.zip -d /var/www \
|
| 22 |
&& rm nextcloud.zip \
|
| 23 |
&& chown -R www-data:www-data /var/www/nextcloud
|
| 24 |
|
|
|
|
| 25 |
COPY nginx.conf /etc/nginx/nginx.conf
|
| 26 |
COPY php-fpm.conf /etc/php/8.1/fpm/pool.d/www.conf
|
| 27 |
COPY supervisor.conf /etc/supervisor/conf.d/supervisor.conf
|
|
|
|
| 32 |
|
| 33 |
CMD ["/start.sh"]
|
| 34 |
|
|
|
nginx.conf
CHANGED
|
@@ -1,11 +1,13 @@
|
|
| 1 |
events {}
|
| 2 |
|
| 3 |
http {
|
|
|
|
|
|
|
| 4 |
server {
|
| 5 |
listen 7860;
|
| 6 |
|
| 7 |
-
# --------
|
| 8 |
-
root /var/www/nextcloud
|
| 9 |
index index.php;
|
| 10 |
|
| 11 |
location / {
|
|
@@ -13,17 +15,20 @@ http {
|
|
| 13 |
}
|
| 14 |
|
| 15 |
location ~ \.php$ {
|
| 16 |
-
include
|
|
|
|
| 17 |
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
|
| 18 |
}
|
| 19 |
|
| 20 |
-
# --------
|
| 21 |
location /cockpit/ {
|
| 22 |
-
proxy_pass http://
|
| 23 |
proxy_http_version 1.1;
|
| 24 |
proxy_buffering off;
|
|
|
|
| 25 |
proxy_set_header Host $host;
|
| 26 |
-
proxy_set_header
|
|
|
|
| 27 |
}
|
| 28 |
}
|
| 29 |
}
|
|
|
|
| 1 |
events {}
|
| 2 |
|
| 3 |
http {
|
| 4 |
+
include /etc/nginx/mime.types;
|
| 5 |
+
|
| 6 |
server {
|
| 7 |
listen 7860;
|
| 8 |
|
| 9 |
+
# -------- Nextcloud --------
|
| 10 |
+
root /var/www/nextcloud;
|
| 11 |
index index.php;
|
| 12 |
|
| 13 |
location / {
|
|
|
|
| 15 |
}
|
| 16 |
|
| 17 |
location ~ \.php$ {
|
| 18 |
+
include fastcgi_params;
|
| 19 |
+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
| 20 |
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
|
| 21 |
}
|
| 22 |
|
| 23 |
+
# -------- Cockpit --------
|
| 24 |
location /cockpit/ {
|
| 25 |
+
proxy_pass http://127.0.0.1:9090/;
|
| 26 |
proxy_http_version 1.1;
|
| 27 |
proxy_buffering off;
|
| 28 |
+
|
| 29 |
proxy_set_header Host $host;
|
| 30 |
+
proxy_set_header Upgrade $http_upgrade;
|
| 31 |
+
proxy_set_header Connection "upgrade";
|
| 32 |
}
|
| 33 |
}
|
| 34 |
}
|
php-fpm.conf
CHANGED
|
@@ -13,7 +13,6 @@ pm.start_servers = 2
|
|
| 13 |
pm.min_spare_servers = 1
|
| 14 |
pm.max_spare_servers = 3
|
| 15 |
|
| 16 |
-
; Enable logging so we can see why it fails
|
| 17 |
catch_workers_output = yes
|
| 18 |
php_admin_flag[log_errors] = on
|
| 19 |
php_admin_value[error_log] = /var/log/php8.1-fpm-error.log
|
|
|
|
| 13 |
pm.min_spare_servers = 1
|
| 14 |
pm.max_spare_servers = 3
|
| 15 |
|
|
|
|
| 16 |
catch_workers_output = yes
|
| 17 |
php_admin_flag[log_errors] = on
|
| 18 |
php_admin_value[error_log] = /var/log/php8.1-fpm-error.log
|