Removed unrelated code base
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
FROM node:slim
|
||||
|
||||
# We don't need the standalone Chromium
|
||||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
|
||||
|
||||
# Install Google Chrome Stable and fonts
|
||||
# Note: this installs the necessary libs to make the browser work with Puppeteer.
|
||||
RUN apt-get update && apt-get install curl gnupg -y \
|
||||
&& curl --location --silent https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
|
||||
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
|
||||
&& apt-get update \
|
||||
&& apt-get install google-chrome-stable -y --no-install-recommends \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
COPY integration-test /app
|
||||
|
||||
RUN npm install
|
||||
|
||||
ENTRYPOINT npm run test:all
|
||||
@@ -1,133 +0,0 @@
|
||||
# MUST BE BUILT FROM .
|
||||
# docker build . -t php7.1-cassandra -f ./Dockerfile
|
||||
FROM php:7.4-fpm
|
||||
|
||||
MAINTAINER Romaric Mourgues <romaric.mourgues@twakeapp.com>
|
||||
|
||||
ARG TIMEZONE
|
||||
ARG APCU_VERSION=5.1.11
|
||||
|
||||
# Set timezone
|
||||
RUN ln -snf /usr/share/zoneinfo/${TIMEZONE} /etc/localtime
|
||||
RUN echo ${TIMEZONE} > /etc/timezone
|
||||
RUN printf '[PHP]\ndate.timezone = "%s"\n', ${TIMEZONE} > /usr/local/etc/php/conf.d/tzone.ini
|
||||
RUN "date"
|
||||
|
||||
RUN apt-get update && apt-get install -y cron
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
openssl \
|
||||
git \
|
||||
unzip
|
||||
|
||||
RUN apt-get update && apt-get install -y libpng-dev
|
||||
|
||||
#MBSTRING
|
||||
RUN docker-php-ext-install mbstring
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libfreetype6-dev \
|
||||
libjpeg62-turbo-dev \
|
||||
libmcrypt-dev \
|
||||
libpng-dev \
|
||||
&& docker-php-ext-install -j$(nproc) iconv mcrypt \
|
||||
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
|
||||
&& docker-php-ext-install -j$(nproc) gd
|
||||
|
||||
#ZIP
|
||||
RUN apt-get update && apt-get install -y zlib1g-dev
|
||||
RUN docker-php-ext-install zip
|
||||
|
||||
#GD images
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libfreetype6-dev \
|
||||
libjpeg62-turbo-dev \
|
||||
libpng-dev \
|
||||
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
|
||||
&& docker-php-ext-install -j$(nproc) gd
|
||||
|
||||
#ZMQ
|
||||
RUN apt-get update && apt-get install -y zlib1g-dev libzmq3-dev wget git \
|
||||
&& pecl install zmq-beta \
|
||||
&& docker-php-ext-install zip \
|
||||
&& docker-php-ext-enable zmq
|
||||
|
||||
#Imagick
|
||||
RUN apt-get update && apt-get install -y ghostscript && apt-get clean
|
||||
RUN apt-get update && apt-get install -y libmagickwand-dev --no-install-recommends && rm -rf /var/lib/apt/lists/*
|
||||
RUN pecl install imagick && docker-php-ext-enable imagick
|
||||
|
||||
#Unoconv
|
||||
RUN apt-get update && apt-get install -y --force-yes unoconv libxml2-dev
|
||||
RUN docker-php-ext-install soap
|
||||
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
# Install Composer
|
||||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||
RUN composer --version
|
||||
|
||||
# Type docker-php-ext-install to see available extensions
|
||||
RUN docker-php-ext-install pdo pdo_mysql
|
||||
|
||||
ENV CASSANDRA_PHP_DRIVER_VERSION 1.3.2
|
||||
|
||||
RUN rm /var/lib/apt/lists/* -vrf && \
|
||||
apt-get clean && apt-get update
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y git wget libssl-dev zlib1g-dev libicu-dev g++ make cmake libuv-dev libgmp-dev uuid-dev && \
|
||||
apt-get autoclean -y && \
|
||||
apt-get clean -y
|
||||
|
||||
# Install datastax php-driver fox cassandra
|
||||
RUN git clone https://github.com/datastax/php-driver.git /usr/src/datastax-php-driver && \
|
||||
cd /usr/src/datastax-php-driver && \
|
||||
git checkout --detach v${CASSANDRA_PHP_DRIVER_VERSION} && \
|
||||
git submodule update --init && \
|
||||
cd ext && \
|
||||
./install.sh && \
|
||||
echo extension=cassandra.so > /usr/local/etc/php/conf.d/cassandra.ini
|
||||
|
||||
# Install PHP extensions
|
||||
RUN docker-php-ext-install zip mbstring intl opcache bcmath && \
|
||||
echo extension=bcmath.so > /usr/local/etc/php/conf.d/docker-php-ext-bcmath.ini && \
|
||||
apt-get install -y php5-xdebug && \
|
||||
echo zend_extension=xdebug.so > /usr/local/etc/php/conf.d/xdebug.ini && \
|
||||
pecl install apcu-5.1.5 && \
|
||||
echo extension=apcu.so > /usr/local/etc/php/conf.d/apcu.ini && \
|
||||
pecl install uuid && \
|
||||
echo extension=uuid.so > /usr/local/etc/php/conf.d/uuid.ini
|
||||
|
||||
|
||||
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
|
||||
&& php composer-setup.php && php -r "unlink('composer-setup.php');" \
|
||||
&& mv composer.phar /usr/local/bin/composer
|
||||
|
||||
## Cleanup
|
||||
RUN apt-get purge -y \
|
||||
g++ \
|
||||
git \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#ACPU
|
||||
RUN pecl install apcu-${APCU_VERSION} && docker-php-ext-enable apcu
|
||||
RUN echo "extension=apcu.so" >> /usr/local/etc/php/php.ini
|
||||
RUN echo "apc.enable_cli=1" >> /usr/local/etc/php/php.ini
|
||||
RUN echo "apc.enable=1" >> /usr/local/etc/php/php.ini
|
||||
|
||||
RUN echo 'alias sf="php app/console"' >> ~/.bashrc
|
||||
RUN echo 'alias sf3="php bin/console"' >> ~/.bashrc
|
||||
|
||||
ADD ./uploads.ini /usr/local/etc/php/conf.d/uploads.ini
|
||||
|
||||
ADD ./www.conf /usr/local/etc/php-fpm.d/
|
||||
|
||||
#ENCRYPTION
|
||||
RUN apt-get update && apt-get install -y git
|
||||
RUN git clone https://github.com/jedisct1/libsodium --branch stable
|
||||
RUN cd libsodium && ./configure && make && make check && make install
|
||||
RUN pecl install -f libsodium
|
||||
RUN echo "extension = sodium.so" >> /usr/local/etc/php/php.ini
|
||||
|
||||
#Sockets for amqp
|
||||
RUN docker-php-ext-install sockets
|
||||
@@ -1,5 +0,0 @@
|
||||
file_uploads = On
|
||||
memory_limit = 5G
|
||||
upload_max_filesize = 5G
|
||||
post_max_size = 5G
|
||||
max_execution_time = 600
|
||||
@@ -1,20 +0,0 @@
|
||||
[www]
|
||||
|
||||
user = www-data
|
||||
group = www-data
|
||||
|
||||
listen = /run/php/php7.0-fpm.sock
|
||||
|
||||
listen.owner = www-data
|
||||
listen.group = www-data
|
||||
|
||||
; 30 childen if php is alone on 2cpu + 2go ram: --> 2go ram available - 0.5 (margin) divided by 50mo (average ram by process)
|
||||
pm = ondemand
|
||||
pm.max_children = 50
|
||||
pm.process_idle_timeout = 10s
|
||||
pm.max_requests = 100
|
||||
|
||||
catch_workers_output = yes
|
||||
php_flag[display_errors] = on
|
||||
php_admin_value[error_log] = /var/log/fpm-php.www.log
|
||||
php_admin_flag[log_errors] = on
|
||||
@@ -1,52 +0,0 @@
|
||||
|
||||
FROM debian:11
|
||||
|
||||
RUN apt-get update && apt-get -y install cron
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
nginx
|
||||
|
||||
RUN apt-get update && apt-get install -y wget
|
||||
|
||||
RUN rm /etc/nginx/sites-enabled/default
|
||||
|
||||
RUN usermod -u 1000 www-data
|
||||
|
||||
RUN apt-get remove certbot
|
||||
RUN apt-get install -y python3 python3-venv libaugeas0
|
||||
RUN python3 -m venv /opt/certbot/
|
||||
RUN /opt/certbot/bin/pip install --upgrade pip
|
||||
RUN /opt/certbot/bin/pip install certbot
|
||||
RUN ln -s /opt/certbot/bin/certbot /usr/bin/certbot
|
||||
|
||||
ADD docker/twake-nginx-php-only/nginx.conf /etc/nginx/nginx.conf
|
||||
|
||||
# Install yarn
|
||||
RUN apt-get update
|
||||
RUN apt-get -y install curl
|
||||
RUN apt-get -y install apt-transport-https ca-certificates apt-utils gnupg
|
||||
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
|
||||
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
|
||||
RUN apt-get update
|
||||
RUN apt-get -y install yarn
|
||||
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
|
||||
RUN apt-get install -y nodejs
|
||||
RUN yarn global add webpack
|
||||
RUN yarn global add webpack-cli
|
||||
RUN apt-get update
|
||||
RUN apt-get -y install git
|
||||
|
||||
# Install php
|
||||
|
||||
ADD docker/twake-nginx/site.conf /etc/nginx/sites-available/site.template
|
||||
ADD docker/twake-nginx-php-only/nginx.conf /etc/nginx/nginx.conf
|
||||
RUN apt-get update && apt-get install gettext-base
|
||||
|
||||
RUN echo "upstream php-upstream { server php:9000; }" > /etc/nginx/conf.d/upstream.conf
|
||||
|
||||
COPY docker/twake-nginx-php-only/entrypoint.sh /
|
||||
RUN chmod 0777 /entrypoint.sh
|
||||
ENTRYPOINT /entrypoint.sh
|
||||
|
||||
EXPOSE 80
|
||||
EXPOSE 443
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
NODE_HOST="${NODE_HOST:-http://node:3000}"
|
||||
PHP_UPSTREAM="${PHP_UPSTREAM:-php:9000}"
|
||||
export NODE_HOST
|
||||
export PHP_UPSTREAM
|
||||
envsubst '$${NODE_HOST}' < /etc/nginx/sites-available/site.template > /etc/nginx/sites-enabled/site
|
||||
echo "upstream php-upstream { server ${PHP_UPSTREAM}; }" > /etc/nginx/conf.d/upstream.conf
|
||||
|
||||
cron -f &
|
||||
nginx -g "daemon off;"
|
||||
@@ -1,65 +0,0 @@
|
||||
user www-data;
|
||||
worker_processes 4;
|
||||
pid /run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 768;
|
||||
# multi_accept on;
|
||||
}
|
||||
|
||||
http {
|
||||
|
||||
client_max_body_size 200M;
|
||||
|
||||
##
|
||||
# Basic Settings
|
||||
##
|
||||
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
keepalive_timeout 65;
|
||||
types_hash_max_size 2048;
|
||||
# server_tokens off;
|
||||
|
||||
# server_names_hash_bucket_size 64;
|
||||
# server_name_in_redirect off;
|
||||
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
##
|
||||
# SSL Settings
|
||||
##
|
||||
|
||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
##
|
||||
# Logging Settings
|
||||
##
|
||||
|
||||
access_log /var/log/nginx/access.log;
|
||||
error_log /var/log/nginx/error.log;
|
||||
|
||||
##
|
||||
# Gzip Settings
|
||||
##
|
||||
|
||||
gzip on;
|
||||
gzip_disable "msie6";
|
||||
|
||||
# gzip_vary on;
|
||||
# gzip_proxied any;
|
||||
# gzip_comp_level 6;
|
||||
# gzip_buffers 16 8k;
|
||||
# gzip_http_version 1.1;
|
||||
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
##
|
||||
# Virtual Host Configs
|
||||
##
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include /etc/nginx/sites-enabled/*;
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
server {
|
||||
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
root /twake-core/web;
|
||||
|
||||
add_header Strict-Transport-Security "max-age=31536000";
|
||||
|
||||
location / {
|
||||
return 302 https://web.twake.app/;
|
||||
}
|
||||
|
||||
location ~ ^/(internal|plugins).* {
|
||||
proxy_pass http://node:3000;
|
||||
}
|
||||
|
||||
location ~ ^/(api|administration)/v2/.* {
|
||||
proxy_pass http://node:3000;
|
||||
}
|
||||
|
||||
location ~ ^/socket/.* {
|
||||
proxy_pass http://node:3000;
|
||||
# this magic is needed for WebSocket
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_connect_timeout 7d;
|
||||
proxy_send_timeout 7d;
|
||||
proxy_read_timeout 7d;
|
||||
}
|
||||
|
||||
location ~ ^/(ajax|api|administration|upload|bundle|medias).* {
|
||||
# try to serve file directly, fallback to rewrite
|
||||
try_files $uri @rewriteapp;
|
||||
}
|
||||
|
||||
location @rewriteapp {
|
||||
# rewrite all to app.php
|
||||
rewrite ^(.*)$ /app.php/$1 last;
|
||||
}
|
||||
|
||||
location ~ /.well-known {
|
||||
allow all;
|
||||
}
|
||||
|
||||
location ~ ^/(app|app_dev|config|dev\/.*)\.php(/|$) {
|
||||
fastcgi_pass php-upstream;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param HTTPS off;
|
||||
fastcgi_buffer_size 128k;
|
||||
fastcgi_buffers 4 256k;
|
||||
fastcgi_busy_buffers_size 256k;
|
||||
}
|
||||
|
||||
location ~ /.well-known {
|
||||
allow all;
|
||||
}
|
||||
|
||||
error_log /var/log/nginx/twakeapp_dev_error.log;
|
||||
access_log /var/log/nginx/twakeapp_dev_access.log;
|
||||
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
FROM twaketech/php7.1-cassandra
|
||||
|
||||
LABEL org.opencontainers.image.authors="Romaric Mourgues <romaric.mourgues@twakeapp.com>,Nguyen Thai <tknguyen@linagora.com>"
|
||||
|
||||
#Crontab
|
||||
ADD docker/twake-php/crontab /etc/cron.d/twake-cron
|
||||
COPY backend/core/ /twake-core/
|
||||
COPY docker/twake-php/entrypoint.sh /
|
||||
|
||||
RUN chmod 0644 /etc/cron.d/twake-cron && \
|
||||
touch /var/log/cron.log && \
|
||||
cd /twake-core/ && php composer.phar install && \
|
||||
chmod +x /entrypoint.sh
|
||||
|
||||
#For exec
|
||||
WORKDIR /twake-core/
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh", "$DEV"]
|
||||
@@ -1,30 +0,0 @@
|
||||
# /etc/crontab: system-wide crontab
|
||||
# Unlike any other crontab you don't have to run the `crontab'
|
||||
# command to install the new version when you edit this file
|
||||
# and files in /etc/cron.d. These files also have username fields,
|
||||
# that none of the other crontabs do.
|
||||
|
||||
SHELL=/bin/sh
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||
|
||||
# m h dom mon dow user command
|
||||
* * * * * root cd /twake-core/; php bin/console twake:mails_queue;
|
||||
* * * * * root cd /twake-core/; php bin/console twake:node:push_mobile;
|
||||
* * * * * root cd /twake-core/; php bin/console twake:node:push_channel_activity;
|
||||
|
||||
* * * * * root cd /twake-core/; php bin/console twake:calendar_check;
|
||||
* * * * * root cd /twake-core/; php bin/console twake:tasks_check_reminders;
|
||||
|
||||
* * * * * root cd /twake-core/; php bin/console twake:notifications_mail;
|
||||
|
||||
* * * * * root cd /twake-core/; php bin/console twake:preview_worker;
|
||||
|
||||
* * * * * root cd /twake-core/; php bin/console twake:scheduled_notifications_consume_timetable
|
||||
* * * * * root cd /twake-core/; php bin/console twake:scheduled_notifications_consume_shard
|
||||
|
||||
* * * * * root chmod -R 777 /twake-core/cache;
|
||||
|
||||
32 * * * * root kill -USR2 1;
|
||||
#
|
||||
#
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -z "$TIMEZONE" ]; then
|
||||
TIMEZONE=Etc/UTC
|
||||
fi
|
||||
|
||||
echo $TIMEZONE > /etc/timezone && \
|
||||
dpkg-reconfigure -f noninteractive tzdata
|
||||
|
||||
sed -i "s|;date.timezone =.*|date.timezone = $TIMEZONE|" /etc/php5/*/php.ini
|
||||
|
||||
if [ -n "$PHP_MEMORY_LIMIT" ]; then
|
||||
sed -i "s/^memory_limit =.*/memory_limit = $PHP_MEMORY_LIMIT/" /etc/php5/*/php.ini
|
||||
fi
|
||||
|
||||
chmod -R 777 /var/www &
|
||||
chmod -R 777 /tmp/
|
||||
rm -R /tmp/*
|
||||
chmod -R 777 /twake-core/ &
|
||||
mkdir /twake-core/cache
|
||||
chmod -R 777 /twake-core/cache &
|
||||
|
||||
if [ "$1" = "dev" ]
|
||||
then
|
||||
if test -f "/twake-core/app/Configuration/Parameters.php"; then
|
||||
echo "Configuration exists, doing nothing."
|
||||
else
|
||||
cp /twake-core/app/Configuration/Parameters.php.dist /twake-core/app/Configuration/Parameters.php
|
||||
fi
|
||||
|
||||
php composer.phar install
|
||||
else
|
||||
if test -f "/configuration/Parameters.php"; then
|
||||
cp /configuration/Parameters.php /twake-core/app/Configuration/Parameters.php
|
||||
else
|
||||
cp /twake-core/app/Configuration/Parameters.php.dist /twake-core/app/Configuration/Parameters.php
|
||||
fi
|
||||
fi
|
||||
|
||||
(php composer.phar dump-autoload --optimize; php composer.phar dump-autoload --classmap-authoritative; php composer.phar dump-autoload --apcu; php bin/console twake:schema:update; php bin/console twake:init; php bin/console twake:init_connector; php bin/console twake:mapping) &
|
||||
|
||||
mkdir /twake-core/cache
|
||||
chmod -R 777 /twake-core/cache &
|
||||
|
||||
echo "" >> /etc/cron.d/twake-cron
|
||||
|
||||
cron -f &
|
||||
docker-php-entrypoint php-fpm
|
||||
@@ -1,26 +0,0 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
|
||||
FROM docker:20.10.17-dind-alpine3.16
|
||||
|
||||
|
||||
RUN apk add --update nodejs-current npm bash curl
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
COPY plugins/ .
|
||||
|
||||
VOLUME /usr/src/app
|
||||
RUN chmod -R +x scripts
|
||||
RUN mv scripts/* /bin
|
||||
RUN apk update
|
||||
RUN apk add git
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user