Test
This commit is contained in:
parent
cfd8e047fb
commit
350352fefd
11
Dockerfile
11
Dockerfile
|
@ -1,18 +1,19 @@
|
|||
FROM trafex/alpine-nginx-php7:latest AS webserver
|
||||
|
||||
LABEL maintainer="matteo@matteogheza.it"
|
||||
LABEL version="1.2"
|
||||
LABEL version="1.0"
|
||||
LABEL description="Docker project for open source firefighter management software"
|
||||
|
||||
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
COPY ./server /var/www/html
|
||||
|
||||
# Install composer from the official image
|
||||
COPY --from=composer /usr/bin/composer /usr/bin/composer
|
||||
|
||||
WORKDIR /var/www/html
|
||||
USER root
|
||||
RUN apk add --no-cache bash sed php-pdo php-pdo_mysql php-pdo_sqlite php-pdo_pgsql
|
||||
RUN composer install --optimize-autoloader --no-interaction --no-progress
|
||||
RUN apk add --no-cache bash sed php-pdo php-pdo_mysql php-pdo_sqlite php-pdo_pgsql git
|
||||
RUN composer install --no-dev --optimize-autoloader --no-interaction --no-progress
|
||||
|
||||
#RUN echo "@reboot cd /var/www/html/install && php install.php config" > /etc/crontabs/root
|
||||
|
||||
USER nobody
|
||||
EXPOSE 8080
|
|
@ -1,29 +1,30 @@
|
|||
version: '3.3'
|
||||
|
||||
services:
|
||||
db:
|
||||
image: mariadb:latest
|
||||
volumes:
|
||||
- db_data:/var/lib/mysql
|
||||
restart: always
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_DATABASE: allerta-db
|
||||
MYSQL_USER: allerta
|
||||
MYSQL_PASSWORD: password
|
||||
|
||||
allerta:
|
||||
depends_on:
|
||||
- db
|
||||
image: allertavvf/allertavvf
|
||||
build: ./
|
||||
ports:
|
||||
- "8081:8080"
|
||||
restart: always
|
||||
environment:
|
||||
ALLERTA_DB_HOST: db:3306
|
||||
ALLERTA_DB_USER: allerta
|
||||
ALLERTA_DB_PASSWORD: password
|
||||
ALLERTA_DB_NAME: allerta-db
|
||||
db:
|
||||
image: mariadb:latest
|
||||
volumes:
|
||||
- db_data:/var/lib/mysql
|
||||
restart: always
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_USER: allerta
|
||||
MYSQL_PASSWORD: password
|
||||
MYSQL_DATABASE: allerta-db
|
||||
allerta:
|
||||
depends_on:
|
||||
- db
|
||||
links:
|
||||
- db:db
|
||||
image: allertavvf/allertavvf
|
||||
build: ./
|
||||
ports:
|
||||
- "8081:8080"
|
||||
restart: always
|
||||
environment:
|
||||
DB_HOST: db
|
||||
DB_USERNAME: root
|
||||
DB_PASSWORD: root
|
||||
DB_NAME: allerta-db
|
||||
volumes:
|
||||
db_data: {}
|
||||
db_data: {}
|
|
@ -393,7 +393,7 @@ INSERT INTO `".$prefix."_options` (`id`, `name`, `value`, `enabled`, `created_ti
|
|||
}
|
||||
|
||||
function validate_arg($options, $name, $default){
|
||||
return array_key_exists($name, $options) ? $options[$name] : (isset($_ENV[$name]) ? $_ENV[$name] : (isset($_ENV[strtoupper($name)]) ? $_ENV[strtoupper($name)] : $default));
|
||||
return array_key_exists($name, $options) ? $options[$name] : (getenv($name)!==false ? getenv($name) : (getenv(strtoupper($name))!==false ? getenv(strtoupper($name)) : $default));
|
||||
}
|
||||
|
||||
function change_dir($directory){
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
[supervisord]
|
||||
nodaemon=true
|
||||
logfile=/dev/null
|
||||
logfile_maxbytes=0
|
||||
pidfile=/run/supervisord.pid
|
||||
|
||||
[program:php-fpm]
|
||||
command=php-fpm7 -F
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
autorestart=false
|
||||
startretries=0
|
||||
|
||||
[program:nginx]
|
||||
command=nginx -g 'daemon off;'
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
autorestart=false
|
||||
startretries=0
|
||||
|
||||
[program:crond]
|
||||
command=crond -f
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
autorestart=false
|
||||
startretries=0
|
||||
|
||||
[program:configurator]
|
||||
command=sh -c "sleep 3;php install.php config"
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
autorestart=false
|
||||
startretries=0
|
||||
directory=/var/www/html/install
|
Loading…
Reference in New Issue