Commit 758f4716 authored by Dernat Rémy's avatar Dernat Rémy
Browse files

update for RHEL-like distro (selinux bug with docker-compose volumes)

parent 5dabfbf3
......@@ -5,8 +5,8 @@ RUN apk --update add php-apache2 php7-session php7-mysqli && rm -f /var/cache/ap
RUN mkdir /app && cd /app && \
wget https://gitlab.mbb.univ-montp2.fr/jlopez/wicopa/-/archive/v0.3/wicopa-v0.3.tar.gz && \
tar -xf wicopa-v0.3.tar.gz && ln -s wicopa-v0.3 wicopa && \
wget https://gitlab.mbb.univ-montp2.fr/jlopez/wicopa/-/archive/v0.4/wicopa-v0.4.tar.gz && \
tar -xf wicopa-v0.4.tar.gz && ln -s wicopa-v0.4 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 && \
......
......@@ -41,10 +41,11 @@ git clone https://gitlab.mbb.univ-montp2.fr/jlopez/wicopa.git
wget http://web.mbb.univ-montp2.fr/download/wicopa.sql.gz
gunzip -d wicopa.sql.gz
mkdir -p /data/mysql/wicopa
sudo mkdir -p /data/mysql/wicopa
docker-compose up --build
sudo docker-compose up --build
# you can access to it at http://127.0.0.1:8000
# you can login as "admin" with password w1c0Pa5s
```
Note that due to selinux problem on some RedHat-like distros, I added the `z` option to the volumes on the docker-compose file. [See here for more informations](https://www.projectatomic.io/blog/2015/06/using-volumes-with-docker-can-cause-problems-with-selinux/)
# wicopa
Web Interface Container Packaging
Wicopa means **Web Interface for Container PAckaging**
This Web UI application can generate Dockerfiles or definition files for Singularity.
# Install
Check [INSTALL](INSTALL.md)
You can test it easily with Docker, using `docker-compose`. [See here](INSTALL.md#using-docker)
# Roadmap
- tags to search recipes [see issue #11](https://gitlab.mbb.univ-montp2.fr/jlopez/wicopa/issues/11)
- Loading and sharing recipes [see issue #10](https://gitlab.mbb.univ-montp2.fr/jlopez/wicopa/issues/10)
- Adding a custom local configuration to all recipes. Indeed, HPC administrator could occasionnally allow Singularity containers on their cluster. Thus, they usually need to edit the recipe to add custom content, in order to rebuild the image. [see issue #7](https://gitlab.mbb.univ-montp2.fr/jlopez/wicopa/issues/7)
- convert the functions to retrieve specific language packages in pure PHP to be able to upgrade it directly from the admin panel [issue #2](https://gitlab.mbb.univ-montp2.fr/jlopez/wicopa/issues/2)
\ No newline at end of file
version: '3'
services:
apache:
web:
build:
context: .
dockerfile: .docker/web/Dockerfile
context: .docker/web
container_name: wicopaweb
restart: always
ports:
- "8000:80"
depends_on:
- mariadb
mariadb:
- db
db:
image: mariadb:10.3
restart: always
container_name: wicopadb
volumes:
- /data/mysql/wicopa:/var/lib/mysql
- ./wicopa.sql:/docker-entrypoint-initdb.d/wicopa.sql
- /data/mysql/wicopa:/var/lib/mysql:z
- ./wicopa.sql:/docker-entrypoint-initdb.d/wicopa.sql:z
environment:
MYSQL_ROOT_PASSWORD: w1c0Pa5s
MYSQL_DATABASE: wicopa
......
......@@ -260,7 +260,7 @@ function generate_container() {
if(isSingularity) {
PREVIEW += "%labels\n";
PREVIEW += "\tAuthor wicopa\n";
PREVIEW += "\tVersion v0.3.1\n";
PREVIEW += "\tVersion v0.4.1\n";
PREVIEW += "\tbuild_date " + current_date + "\n";
if(filename) {
PREVIEW += "\tImage_name " + filename + "\n";
......@@ -272,7 +272,7 @@ function generate_container() {
}
} else {
PREVIEW += "LABEL Author wicopa\n";
PREVIEW += "LABEL Version v0.3.1\n";
PREVIEW += "LABEL Version v0.4.1\n";
PREVIEW += "LABEL build_date " + current_date + "\n";
if(filename) {
PREVIEW += "LABEL Image_name " + filename + "\n";
......
Markdown is supported
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