Commit a40f526c authored by remy's avatar remy
Browse files

Adding Dockerfiles

parent b1800eea
......@@ -10,10 +10,10 @@ RUN mkdir /app && cd /app && \
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_HOSTNAME = ''#DB_HOSTNAME = 'wicopadb'#" 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
sed -i "s#'to_replace_with_your_admin_pass'#'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 && \
......
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
# Installing wicopa
```bash
git clone https://gitlab.mbb.univ-montp2.fr/jlopez/wicopa.git
apt-get install -y apache2 mariadb-server php7.0 phpmyadmin libapache2-mod-php7.0 pv
a2enmod php7.0
......@@ -29,4 +31,17 @@ pv wicopa.sql.gz | gunzip | mysql -u wicopauser -p wicopa
vim conf/Conf.php
```
# Using Docker
```bash
git clone https://gitlab.mbb.univ-montp2.fr/jlopez/wicopa.git
# you need to have wicopa.sql here
wget http://web.mbb.univ-montp2.fr/download/wicopa.sql.gz
gunzip -d wicopa.sql.gz
mkdir -p /data/mysql/wicopa
docker-compose up --build
# you can access to it at http://127.0.0.1:8000
```
......@@ -4,39 +4,24 @@ services:
apache:
build:
context: .
dockerfile: .dockerweb/Dockerfile
dockerfile: .docker/web/Dockerfile
container_name: wicopaweb
restart: always
ports:
- "8000:80"
volumes:
- /etc/localtime:/etc/localtime:ro
networks:
- web
depends_on:
- mariadb
mariadb:
#image: yobasystems/alpine-mariadb
build:
context: .
dockerfile: .dockerdb/Dockerfile
image: mariadb:10.3
restart: always
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
- /data/mysql/wicopa:/var/lib/mysql
- ./wicopa.sql:/docker-entrypoint-initdb.d/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