Added Dockerfile for Apr2019

Signed-off-by: Lucas Fernandes de Oliveira's avatarLucas Fernandes de Oliveira <lfoliveira@inf.ufpr.br>
parent d7d7c671
variables:
image_version: '11.33.3'
DOCKER_URL: 'dockerregistry.c3sl.ufpr.br:5000/c3sl/monetdb-ci-service'
stages:
- build
- deploy
build:
stage: build
script:
- docker build -t ${DOCKER_URL}:${image_version} -t ${DOCKER_URL}:latest .
tags:
- docker
- build
deploy:
stage: deploy
script:
- docker push ${DOCKER_URL}:${image_version}
- docker push ${DOCKER_URL}:latest
tags:
- docker
- build
only:
- master
......@@ -44,7 +44,7 @@ RUN yum install -y https://www.monetdb.org/downloads/epel/MonetDB-release-epel.n
RUN yum update -y && \
yum upgrade -y
ARG MonetDBVersion=11.31.7
ARG MonetDBVersion=11.33.3
# Install MonetDB server
RUN yum install -y MonetDB-$MonetDBVersion \
......@@ -89,3 +89,14 @@ RUN su -c 'sh /home/monetdb/init-db.sh' monetdb
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
# CUSTOM
ENV MONETDB_NAME dbmonet
ENV MONETDB_USER dbmonet
ENV MONETDB_PASSWORD dbmonet
WORKDIR /home/monetdb
COPY script.sh /etc/script/script.sh
CMD ["/bin/bash", "/etc/script/script.sh"]
/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf &
# the first argument will the database name
condition=true
while $condition ; do
# it will create a database called monetdb
monetdb create $MONETDB_NAME
# $? is the result 0 for sucess 1 for err
try=$?
if [ $try == "0" ]
then
# the test has succeed
condition=false
else
# the test has failed will try again in 5s
sleep 5s
fi
done
monetdb release $MONETDB_NAME
# .monetdb will be read when mclient is called without user and password
echo "user=monetdb" > .monetdb
echo "password=monetdb" >> .monetdb
mclient -d $MONETDB_NAME -s "create user \"$MONETDB_USER\" with password '$MONETDB_PASSWORD' name 'ci' schema \"sys\"";
echo "user=$MONETDB_USER" > .monetdb
echo "password=$MONETDB_PASSWORD" >> .monetdb
wait
\ 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