Commit 6825a600 authored by jlopez's avatar jlopez
Browse files

Fix conflit

parents 1a892516 f123b4be
......@@ -5,15 +5,18 @@ 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.4/wicopa-v0.4.tar.gz && \
tar -xf wicopa-v0.4.tar.gz && ln -s wicopa-v0.4 wicopa && \
cp wicopa/inc/conf/Conf.php.sample wicopa/inc/conf/Conf.php && \
wget https://gitlab.mbb.univ-montp2.fr/jlopez/wicopa/-/archive/v0.4.1/wicopa-v0.4.1.tar.gz && \
tar -xf wicopa-v0.4.1.tar.gz && ln -s wicopa-v0.4.1 wicopa
WORKDIR /app/wicopa
RUN cp inc/conf/Conf.php.sample inc/conf/Conf.php && \
chown -R apache:apache /app && \
sed -i "s#DB_NAME = ''#DB_NAME = 'wicopa'#" wicopa/inc/conf/Conf.php && \
sed -i "s#DB_HOSTNAME = ''#DB_HOSTNAME = 'wicopadb'#" wicopa/inc/conf/Conf.php && \
sed -i "s#DB_USERNAME = ''#DB_USERNAME = 'wicopauser'#" wicopa/inc/conf/Conf.php && \
sed -i "s#DB_PP = ''#DB_PP = 'w1c0Pa5s'#" wicopa/inc/conf/Conf.php && \
sed -i "s#'to_replace_with_your_admin_pass'#'450cb0c92db35549cb926efc391df2ceae4b48d1'#" wicopa/inc/conf/Conf.php
sed -i "s#DB_NAME = ''#DB_NAME = 'wicopa'#" inc/conf/Conf.php && \
sed -i "s#DB_HOSTNAME = ''#DB_HOSTNAME = 'wicopadb'#" inc/conf/Conf.php && \
sed -i "s#DB_USERNAME = ''#DB_USERNAME = 'wicopauser'#" inc/conf/Conf.php && \
sed -i "s#DB_PP = ''#DB_PP = 'w1c0Pa5s'#" inc/conf/Conf.php && \
sed -i "s#'to_replace_with_your_admin_pass'#'450cb0c92db35549cb926efc391df2ceae4b48d1'#" inc/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 && \
......
stages:
- build
- test
- deploy
- check
image: docker:latest
image: tmaier/docker-compose
services:
- docker:dind
- docker:dind
variables:
# DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
before_script:
- cat /etc/hosts
- cat /etc/resolv.conf
- docker info
PrebuildJob:
buildJob:
stage: build
tags:
- jimmy
- bioco
only:
- master
script:
- apk update
- apk add --no-cache py-pip python-dev libffi-dev openssl-dev gcc libc-dev make wget gzip git net-tools
- apk add --no-cache wget gzip git net-tools
- git clone https://gitlab.mbb.univ-montp2.fr/jlopez/wicopa.git
- cd wicopa
- wget -q http://web.mbb.univ-montp2.fr/download/wicopa.sql.gz
- gunzip -d wicopa.sql.gz
- pip install docker-compose
- docker-compose --version
- docker info
- docker-compose build
TestJob:
stage: test
tags:
- jimmy
script:
- docker info
RunDeployment:
stage: deploy
tags:
- jimmy
script:
- docker-compose up
checking:
stage: check
tags:
- jimmy
script:
- netstat -naptu |grep -E "80|3306"
- wget http://127.0.0.1:8000
- cat index.*
......@@ -10,6 +10,61 @@ require_once "./inc/php/buildHeader.php";
?>
<<<<<<< HEAD
=======
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css" crossorigin="anonymous">
<!-- local fallbacks -->
<!--link rel="stylesheet" href="./inc/css/bootstrap.min.css">
<link rel="stylesheet" href="./inc/css/jquery.dataTables.min.css"-->
<link rel="stylesheet" href="./inc/css/style.css">
<title>wicopa</title>
</head>
<body>
<nav class="navbar navbar-expand-md navbar-dark navbar-custom p-0">
<a class="navbar-brand" href="#">WICOPA</a>
<div class="collapse navbar-collapse justify-content-between" id="navbar">
<div class="navbar-nav justify-content-center">
<?php
if(isset($_SESSION['username']) && !empty($_SESSION['username']))
{
echo ' <a class="nav-item nav-link" href="./index.php"> Home </a>';
echo ' <a class="nav-item nav-link" href="./gestion.php"> Gestion </a>';
}
?>
</div>
<div class="navbar-nav">
<?php
if(isset($_SESSION['username']) && !empty($_SESSION['username']))
{
echo '<a class="nav-item btn btn-primary " href="./action/action_logout.php"> Logout ('.$_SESSION['username'].') </a>';
}
else
{
echo '<a class="nav-item btn btn-primary" href="./login.php"> Login </a>';
}
?>
</div>
</nav>
>>>>>>> f123b4be009adfbfca34a7889a496e1d4a6ec6ff
<div class="container-fluid">
......
......@@ -677,6 +677,13 @@ require_once "./inc/php/buildHeader.php";
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<<<<<<< HEAD
=======
<!-- local fallbaks -->
<!--script src="inc/js/jquery-latest.min.js" type="text/javascript"></script>
<script src="inc/js/bootstrap.min.js" type="text/javascript"></script-->
>>>>>>> f123b4be009adfbfca34a7889a496e1d4a6ec6ff
</body>
</html>
\ No newline at end of file
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