Commit ca3695b0 authored by cazenave's avatar cazenave
Browse files

test dockerfile sur security-internal

parent c181d311
Pipeline #2212 failed with stages
in 2 minutes and 52 seconds
FROM ayan4m1/maven-node
EXPOSE 4200 9000 9001 8080
COPY . .
WORKDIR /tools
ENTRYPOINT ./start_vitamui_docker.sh
......@@ -12,7 +12,7 @@ spring:
register: false
data:
mongodb:
uri: mongodb://mongod_dbuser_iam:mongod_dbpwd_iam@localhost:27018/iam?connectTimeoutMS=2000
uri: mongodb://mongod_dbuser_iam:mongod_dbpwd_iam@mongo-dev:27018/iam?connectTimeoutMS=2000
server-identity:
identityName: vitamui-dev
......@@ -33,7 +33,7 @@ security:
port: 8084
cas-client:
server-host: dev.vitamui.com
server-host: cas
server-port: 8080
secure: true
ssl-configuration:
......
FROM java:8-jdk-alpine
COPY target/ .
# ENTRYPOINT ["sh", "-c" , "java -jar security-internal-1.0.0-SNAPSHOT.jar -Xms128m -Xmx512m --spring.config.additional-location=file:classes/security-internal-application-dev.yml"]
WORKDIR .
ADD target/security-internal-1.0.0-SNAPSHOT.jar app.jar
ADD src/main/config/security-internal-application-dev.yml application.yml
ADD src/main/config/*.jks ./
ENTRYPOINT java -jar app.jar --spring.profiles.active=dev --spring.config.location=classpath:./application.yml,file:./application.yml
......@@ -9,7 +9,7 @@ spring:
register: false
data:
mongodb:
uri: mongodb://mongod_dbuser_security:mongod_dbpwd_security@localhost:27018/security?connectTimeoutMS=2000
uri: mongodb://mongod_dbuser_security:mongod_dbpwd_security@mongo-dev:27018/security?connectTimeoutMS=2000
server-identity:
identityName: vitamui-dev
......
# docker-compose.yml
version: '3'
services:
security-internal:
image: cines/vitamui-security-internal:v0
ports:
- 8084:8084
FROM mongo:4.0.6
EXPOSE 27018
RUN mkdir -p /data/db2 \
&& echo "dbpath = /data/db2" > /etc/mongodb.conf \
&& chown -R mongodb:mongodb /data/db2
COPY $PWD/mongo-entrypoint/last /data/db2/scripts
COPY $PWD/replica-set/ /vitamui/scripts/mongo/replica-set
#RUN mongod --replSet "rs0" --port=27018
#CMD mongo --port=27018 < /vitamui/scripts/mongo/replica-set/000_replicaset_dev.js && \
# sleep 5 && \
# mongo --port=27018 < /vitamui/scripts/mongo/replica-set/00_check_replicaset.js && \
# cat /vitamui/scripts/mongo/data/last/*.js | mongo --port=27018
RUN mongod --replSet "rs0" --port=27018 --fork --logpath /var/log/mongodb.log --dbpath /data/db2 \
&& CREATE_FILES=/data/db2/scripts/*.js \
&& for f in $CREATE_FILES; do mongo 127.0.0.1:27018 $f; done \
&& INSERT_FILES=/data/db2/scripts/*-insert.js \
&& for f in $INSERT_FILES; do mongo 127.0.0.1:27018 $f; done \
&& mongod --dbpath /data/db2 --shutdown \
&& chown -R mongodb /data/db2
VOLUME /data/db2
CMD ["mongod", "--config", "/etc/mongodb.conf"]
......@@ -13,9 +13,9 @@ services:
# 27018 is selected in order to avoid a conflict with Vitam docker instance
- "27018:27018"
volumes:
# if you wish to setup additional user accounts specific per DB or with different roles you can use following entry point
- "$PWD/mongo-entrypoint/:/vitamui/scripts/mongo/data"
- "$PWD/replica-set/:/vitamui/scripts/mongo/replica-set"
# no --auth is needed here as presence of username and password add this option automatically
command: mongod --replSet "rs0" --port=27018
#!/usr/bin/env bash
docker container stop $(docker container ls -aq)
pushd ../docker/mongo ; ./start_dev.sh ; popd
docker build -t security-internal .
docker run -p 8084:8084 security-internal
version: '3'
services:
mongo-dev:
image: mongo:4
container_name: vitamui-mongo
hostname: 127.0.0.1
ports:
- "27018:27018"
volumes:
- ./scripts:/scripts
command: mongod --replSet "rs0" --port=27018
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