mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
add configs for docker build
This commit is contained in:
parent
32e178b43b
commit
4de85b3e20
15
Dockerfile
15
Dockerfile
@ -0,0 +1,15 @@
|
||||
FROM nginx
|
||||
|
||||
# install php fpm
|
||||
RUN apt-get update \
|
||||
&& apt-get -y --no-install-recommends install curl zip php7.3-curl php7.3-zip php7.3-fpm php7.3-mbstring php7.3-intl php7.3-xml php7.3-pdo php7.3-mysql \
|
||||
&& apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
|
||||
|
||||
# install composer
|
||||
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
|
||||
|
||||
WORKDIR /usr/share/nginx/html
|
||||
|
||||
COPY . .
|
||||
COPY ./config/nginx/nginx.conf /etc/nginx/nginx.conf
|
||||
RUN composer install --no-scripts --no-autoloader
|
||||
@ -263,9 +263,9 @@ return [
|
||||
* the following line and set the port accordingly
|
||||
*/
|
||||
//'port' => 'non_standard_port_number',
|
||||
'username' => 'my_app',
|
||||
'password' => 'secret',
|
||||
'database' => 'my_app',
|
||||
'username' => env('DB_USER', 'root'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'database' => env('DB_DATABASE', 'gradido_community'),
|
||||
/*
|
||||
* You do not need to set this flag to use full utf-8 encoding (internal default since CakePHP 3.6).
|
||||
*/
|
||||
@ -294,7 +294,7 @@ return [
|
||||
*/
|
||||
//'init' => ['SET GLOBAL innodb_stats_on_metadata = 0'],
|
||||
|
||||
'url' => env('DATABASE_URL', null),
|
||||
'url' => env('MARIADB_URL', null),
|
||||
],
|
||||
|
||||
/**
|
||||
@ -394,7 +394,7 @@ return [
|
||||
// Gradido specific configuration
|
||||
// Login Server ip and port
|
||||
'LoginServer' => [
|
||||
'host' => 'http://127.0.0.1',
|
||||
'host' => 'login-server',
|
||||
'port' => 1201
|
||||
],
|
||||
|
||||
|
||||
58
config/nginx/nginx.conf
Normal file
58
config/nginx/nginx.conf
Normal file
@ -0,0 +1,58 @@
|
||||
server {
|
||||
|
||||
listen 80 ;
|
||||
listen [::]:80;
|
||||
server_name 0.0.0.0;
|
||||
|
||||
#include /etc/nginx/common/protect.conf;
|
||||
#include /etc/nginx/common/protect_add_header.conf;
|
||||
#include /etc/nginx/common/ssl.conf;
|
||||
|
||||
|
||||
root /usr/share/nginx/html/webroot;
|
||||
index index.php;
|
||||
|
||||
location ~* \.(png|jpg|ico)\$ {
|
||||
expires 30d;
|
||||
}
|
||||
|
||||
location ~* \.(js|css) {
|
||||
# expires 1d;
|
||||
expires 1d;
|
||||
}
|
||||
|
||||
location ~ \.php\$ {
|
||||
include snippets/fastcgi-php.conf;
|
||||
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
|
||||
#fastcgi_pass 127.0.0.1:9000;
|
||||
|
||||
}
|
||||
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location /account {
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade \$http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_cache_bypass \$http_upgrade;
|
||||
proxy_set_header X-Real-IP \$remote_addr;
|
||||
proxy_set_header X-Forwarded-For \$remote_addr;
|
||||
proxy_set_header Host \$host;
|
||||
rewrite /account/(.*) /\$1 break;
|
||||
|
||||
#proxy_next_upstream error timeout invalid_header http_502 non_idempotent;
|
||||
proxy_pass http://login-server:1200;
|
||||
proxy_redirect off;
|
||||
|
||||
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files \$uri \$uri/ /index.php?\$args;
|
||||
}
|
||||
|
||||
# access_log /var/log/nginx/access.log main;
|
||||
|
||||
}
|
||||
2
config/php-fpm/php-ini-overrides.ini
Normal file
2
config/php-fpm/php-ini-overrides.ini
Normal file
@ -0,0 +1,2 @@
|
||||
#upload_max_filesize = 100M
|
||||
#post_max_size = 108M
|
||||
Loading…
x
Reference in New Issue
Block a user