Refactor, using variables
This commit is contained in:
parent
6b09ab1b44
commit
cd57753763
37
Dockerfile
37
Dockerfile
@ -4,31 +4,36 @@
|
||||
|
||||
FROM php:5.6-apache
|
||||
|
||||
MAINTAINER François Jacquet <francoisjacquet@users.noreply.github.com>
|
||||
LABEL maintainer="François Jacquet <francoisjacquet@users.noreply.github.com>"
|
||||
|
||||
ENV PGHOST=rosariosisdb \
|
||||
PGUSER=postgres \
|
||||
PGPASSWORD=postgres \
|
||||
PGDATABASE=postgres \
|
||||
PGPORT=5432 \
|
||||
ROSARIOSIS_YEAR=2017 \
|
||||
ROSARIOSIS_LANG='en_US'
|
||||
|
||||
# Upgrade packages.
|
||||
# Change date to force an upgrade:
|
||||
RUN apt-get update # 2016-06-29
|
||||
RUN apt-get upgrade -y
|
||||
|
||||
# Install git, Apache2 + PHP + PostgreSQL webserver, sendmail, wkhtmltopdf & others utilities.
|
||||
RUN apt-get install postgresql-client wkhtmltopdf libpq-dev libpng-dev libxml2-dev sendmail -y;
|
||||
|
||||
# Change date to force an upgrade:
|
||||
RUN apt-get update && \
|
||||
apt-get upgrade -y && \
|
||||
apt-get install postgresql-client wkhtmltopdf libpq-dev libpng-dev libxml2-dev sendmail -y;
|
||||
|
||||
RUN docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
|
||||
docker-php-ext-install -j$(nproc) gd mbstring xml pgsql gettext xmlrpc
|
||||
docker-php-ext-install -j$(nproc) gd mbstring xml pgsql gettext xmlrpc
|
||||
|
||||
RUN mkdir /usr/src/rosariosis && curl -L https://github.com/francoisjacquet/rosariosis/tarball/v3.5 | tar xz --strip-components=1 -C /usr/src/rosariosis
|
||||
|
||||
WORKDIR /usr/src/rosariosis
|
||||
|
||||
RUN rm -rf /var/www/html && mkdir -p /var/www && \
|
||||
# Download and extract rosariosis
|
||||
ENV ROSARIOSIS_VERSION 'v3.5'
|
||||
RUN mkdir /usr/src/rosariosis && \
|
||||
curl -L https://github.com/francoisjacquet/rosariosis/tarball/${ROSARIOSIS_VERSION} \
|
||||
| tar xz --strip-components=1 -C /usr/src/rosariosis && \
|
||||
rm -rf /var/www/html && mkdir -p /var/www && \
|
||||
ln -s /usr/src/rosariosis/ /var/www/html && chmod 777 /var/www/html &&\
|
||||
chown -R www-data:www-data /usr/src/rosariosis
|
||||
|
||||
|
||||
# Uncomment to checkout a tagged release:
|
||||
# RUN git checkout 2.9.3
|
||||
|
||||
# Copy our custom RosarioSIS configuration file.
|
||||
COPY conf/config.inc.php /usr/src/rosariosis/config.inc.php
|
||||
COPY conf/.htaccess /usr/src/rosariosis/.htaccess
|
||||
|
@ -4,11 +4,11 @@ services:
|
||||
|
||||
db:
|
||||
image: sameersbn/postgresql:9.5
|
||||
environment:
|
||||
POSTGRES_PASSWORD: example
|
||||
DB_USER: rosario
|
||||
DB_PASS: rosariopwd
|
||||
DB_NAME: rosariosis
|
||||
# environment:
|
||||
# POSTGRES_PASSWORD: example
|
||||
# DB_USER: rosario
|
||||
# DB_PASS: rosariopwd
|
||||
# DB_NAME: rosariosis
|
||||
|
||||
web:
|
||||
build: .
|
||||
@ -18,14 +18,7 @@ services:
|
||||
- db
|
||||
environment:
|
||||
PGHOST: db
|
||||
PGUSER: rosario
|
||||
PGPASSWORD: rosariopwd
|
||||
PGDATABASE: rosariosis
|
||||
PGPORT: 5432
|
||||
ROSARIOSIS_YEAR: 2017
|
||||
ROSARIOSIS_LANG: 'es_ES'
|
||||
|
||||
adminer:
|
||||
image: adminer
|
||||
ports:
|
||||
- 8081:8080
|
||||
# PGUSER: rosario
|
||||
# PGPASSWORD: rosariopwd
|
||||
# PGDATABASE: rosariosis
|
||||
# ROSARIOSIS_LANG: 'es_ES'
|
||||
|
Loading…
x
Reference in New Issue
Block a user