New Docker container

This commit is contained in:
Matteo Gheza 2020-05-05 17:38:18 +02:00
parent 0439082c47
commit 5390cfde43
2 changed files with 39 additions and 4 deletions

View File

@ -1,12 +1,18 @@
FROM trafex/alpine-nginx-php7:latest
FROM trafex/alpine-nginx-php7:latest AS webserver
LABEL maintainer="matteo@matteogheza.it"
LABEL version="1.0"
LABEL version="1.2"
LABEL description="Docker project for open source firefighter management software"
COPY ./server /var/www/html
# Install composer from the official image
COPY --from=composer /usr/bin/composer /usr/bin/composer
# Run composer install to install the dependencies
#RUN composer install --optimize-autoloader --no-interaction --no-progress
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
USER nobody
EXPOSE 8080

29
docker-compose.yaml Normal file
View File

@ -0,0 +1,29 @@
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
volumes:
db_data: {}