Commit b1800eea authored by remy's avatar remy
Browse files

-a

first tries docker
parent 1ca58e52
FROM yobasystems/alpine-mariadb
# docker-entrypoint-initdb.d script failed because of the size of the inserts...
RUN "/usr/bin/mysqld_safe --skip-grant-tables &" && \
mysql -u root -e "CREATE DATABASE wicopa" && \
mysql -u root wicopa < /tmp/wicopa.sql
FROM alpine:3.9
MAINTAINER remyd1 - https://github.com/remyd1
RUN apk --update add php-apache2 php7-session php7-mysqli && rm -f /var/cache/apk/*
RUN mkdir /app && cd /app && \
wget https://gitlab.mbb.univ-montp2.fr/jlopez/wicopa/-/archive/v0.2/wicopa-v0.2.tar.gz && \
tar -xf wicopa-v0.2.tar.gz && ln -s wicopa-v0.2 wicopa && \
cp wicopa/conf/Conf.php.sample wicopa/conf/Conf.php && \
chown -R apache:apache /app && \
sed -i "s#DB_NAME = ''#DB_NAME = 'wicopa'#" wicopa/conf/Conf.php && \
sed -i "s#DB_HOSTNAME = ''#DB_HOSTNAME = 'localhost'#" wicopa/conf/Conf.php && \
sed -i "s#DB_USERNAME = ''#DB_USERNAME = 'wicopauser'#" wicopa/conf/Conf.php && \
sed -i "s#DB_PP = ''#DB_PP = 'w1c0Pa5s'#" wicopa/conf/Conf.php && \
sed -i "s#KK = ''#KK = '450cb0c92db35549cb926efc391df2ceae4b48d1'#" wicopa/conf/Conf.php
RUN sed -i 's/^#ServerName .*/ServerName localhost:80/g' /etc/apache2/httpd.conf && \
sed -i 's#/var/www/localhost/htdocs#/app/wicopa#g' /etc/apache2/httpd.conf && \
sed -i 's/^LoadModule php7_module.*/LoadModule php7_module modules\/libphp7\.so/g' /etc/apache2/httpd.conf && \
sed -i 's/DirectoryIndex index\.html/DirectoryIndex index\.php/g' /etc/apache2/httpd.conf && \
sed -ri 's#^DocumentRoot .*#DocumentRoot "/app/wicopa"#g' /etc/apache2/httpd.conf && \
sed -i 's#AllowOverride None#AllowOverride All#g' /etc/apache2/httpd.conf && \
echo "AddType application/x-httpd-php .php" >> /etc/apache2/httpd.conf
RUN echo "Success"
EXPOSE 80
ENTRYPOINT httpd -D FOREGROUND && /bin/bash
version: '3'
services:
apache:
build:
context: .
dockerfile: .dockerweb/Dockerfile
container_name: wicopaweb
ports:
- "8000:80"
volumes:
- /etc/localtime:/etc/localtime:ro
networks:
- web
depends_on:
- mariadb
mariadb:
#image: yobasystems/alpine-mariadb
build:
context: .
dockerfile: .dockerdb/Dockerfile
container_name: wicopadb
volumes:
- /etc/localtime:/etc/localtime:ro
- /data/mysql:/var/lib/mysql
# following failed because of the size of the inserts
#- ./wicopa.sql:/docker-entrypoint-initdb.d/wicopa.sql
- ./wicopa.sql:/tmp/wicopa.sql
environment:
TZ: "Europe/Paris"
MYSQL_ROOT_PASSWORD: w1c0Pa5s
MYSQL_DATABASE: wicopa
MYSQL_USER: wicopauser
MYSQL_PASSWORD: w1c0Pa5s
networks:
- web
expose:
- "3306"
networks:
web:
driver: bridge
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment