Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
jlopez
wicopa
Commits
3d3b9262
Commit
3d3b9262
authored
May 27, 2019
by
remy
Committed by
jlopez
May 27, 2019
Browse files
-a
refactoring
parent
28bb7c97
Changes
44
Hide whitespace changes
Inline
Side-by-side
.docker/web/Dockerfile
deleted
100644 → 0
View file @
28bb7c97
FROM
alpine:3.9
LABEL
Author 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.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
&&
\
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#'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
&&
\
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
.docker/web/Dockerfile
0 → 120000
View file @
3d3b9262
Dockerfile.develop
\ No newline at end of file
.docker/web/Dockerfile.develop
0 → 100644
View file @
3d3b9262
FROM alpine:3.9
LABEL Author remyd1 - https://github.com/remyd1
RUN apk --update add php-apache2 php7-session php7-mysqli git && rm -f /var/cache/apk/*
RUN mkdir /app && cd /app && \
git clone https://gitlab.mbb.univ-montp2.fr/jlopez/wicopa.git
WORKDIR /app/wicopa
RUN git checkout develop && \
cp inc/conf/Conf.php.sample inc/conf/Conf.php && \
chown -R apache:apache /app && \
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 && \
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
.docker/web/Dockerfile.stable
0 → 100644
View file @
3d3b9262
FROM alpine:3.9
LABEL Author 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.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 && \
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
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
.gitignore
View file @
3d3b9262
wicopa.sql
conf/Conf.php
inc/
conf/Conf.php
*.swp
.docker/db/wicopa/*
.gitlab-ci.yml
0 → 100644
View file @
3d3b9262
stages
:
-
build
image
:
tmaier/docker-compose
services
:
-
docker:dind
variables
:
DOCKER_DRIVER
:
overlay2
buildJob
:
stage
:
build
tags
:
-
bioco
only
:
master
script
:
-
apk update
-
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
-
docker-compose build
INSTALL.md
View file @
3d3b9262
...
...
@@ -9,7 +9,7 @@ a2enmod php7.0
cd
/var/www/html/wicopa
cp
conf/Conf.php.sample conf/Conf.php
cp
inc/
conf/Conf.php.sample
inc/
conf/Conf.php
chown
-R
www-data /var/www/html/wicopa
chmod
-R
o-r /var/www/html/wicopa
...
...
@@ -30,7 +30,7 @@ wget http://web.mbb.univ-montp2.fr/download/wicopa.sql.gz
pv wicopa.sql.gz |
gunzip
| mysql
-uwicopauser
-p
wicopa
vim conf/Conf.php
vim
inc/
conf/Conf.php
```
# Using Docker
...
...
container.php
View file @
3d3b9262
...
...
@@ -21,8 +21,13 @@ $containers = $db->getContainers();
<!-- 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"
>
<link
rel=
"stylesheet"
href=
"./css/style.css"
>
<script
src=
"./js/jscolor.js"
></script>
<!-- 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"
>
<script
src=
"./inc/js/jscolor.js"
></script>
<title>
wicopa
</title>
</head>
...
...
@@ -181,10 +186,13 @@ $containers = $db->getContainers();
<!-- jQuery Version 1.11.1 -->
<script
src=
"http://code.jquery.com/jquery-latest.min.js"
type=
"text/javascript"
></script>
<!-- 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>
<!-- local fallbacks -->
<!--script src="inc/js/jquery-latest.min.js" type="text/javascript"></script>
<script src="inc/js/bootstrap.min.js" type="text/javascript"></script-->
<script
type=
"text/javascript"
>
</script>
...
...
dao/DBquery.php
View file @
3d3b9262
...
...
@@ -6,7 +6,7 @@
* Time: 16:38
*/
require_once
(
__DIR__
.
'/../conf/Conf.php'
);
require_once
(
__DIR__
.
'/../
inc/
conf/Conf.php'
);
require_once
(
__DIR__
.
'/../model/Section.php'
);
require_once
(
__DIR__
.
'/../model/Manager.php'
);
require_once
(
__DIR__
.
'/../model/Distribution.php'
);
...
...
dao/LDAPquery.php
View file @
3d3b9262
...
...
@@ -4,7 +4,7 @@
* Connection to ldap
*/
require_once
(
__DIR__
.
'/../conf/Conf.php'
);
require_once
(
__DIR__
.
'/../
inc/
conf/Conf.php'
);
class
LDAPquery
{
...
...
conf/Conf.php.sample
→
inc/
conf/Conf.php.sample
View file @
3d3b9262
File moved
css/.DS_Store
→
inc/
css/.DS_Store
View file @
3d3b9262
File moved
css/bootstrap-grid.css
→
inc/
css/bootstrap-grid.css
View file @
3d3b9262
File moved
css/bootstrap-grid.css.map
→
inc/
css/bootstrap-grid.css.map
View file @
3d3b9262
File moved
css/bootstrap-grid.min.css
→
inc/
css/bootstrap-grid.min.css
View file @
3d3b9262
File moved
css/bootstrap-grid.min.css.map
→
inc/
css/bootstrap-grid.min.css.map
View file @
3d3b9262
File moved
css/bootstrap-reboot.css
→
inc/
css/bootstrap-reboot.css
View file @
3d3b9262
File moved
css/bootstrap-reboot.css.map
→
inc/
css/bootstrap-reboot.css.map
View file @
3d3b9262
File moved
css/bootstrap-reboot.min.css
→
inc/
css/bootstrap-reboot.min.css
View file @
3d3b9262
File moved
css/bootstrap-reboot.min.css.map
→
inc/
css/bootstrap-reboot.min.css.map
View file @
3d3b9262
File moved
Prev
1
2
3
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment