Commit 898c241a authored by juan's avatar juan
Browse files

Agregar configuraciones dockerfiles

parent cd0173a1
FROM alpine:latest
RUN apk add --no-cache openjdk8
RUN apk add --no-cache bash
COPY wait-for.sh /opt/lib/wait-for-it.sh
RUN chmod +x /opt/lib/wait-for-it.sh
\ No newline at end of file
FROM alpine-jdk:base
COPY files/clienteFinalSOAP*.jar /opt/lib/clientefinalsoap.jar
version: '2.2'
services:
eureka:
container_name: eureka
build:
context: .
dockerfile: eureka
image: eureka:latest
mem_limit: 300m
memswap_limit: 300m
expose:
- "8761"
ports:
- "8761:8761"
networks:
- plataforma_comunes
configserver:
container_name: configserver
build:
context: .
dockerfile: serverconfig
command: ["-c","/opt/lib/wait-for-it.sh eureka:8761 && /usr/bin/java -jar /opt/lib/serverconfig.jar"]
entrypoint: ["/bin/sh"]
image: serverconfig:latest
environment:
SPRING_APPLICATION_JSON: '{"spring":{"application":{"name":"configserver"}}}'
mem_limit: 300m
memswap_limit: 300m
expose:
- "8888"
ports:
- "8888:8888"
depends_on:
- eureka
networks:
- plataforma_comunes
networks:
plataforma_comunes:
external: true
\ No newline at end of file
FROM alpine-jdk:base
COPY files/conectorentrada*.jar /opt/lib/conectorentrada.jar
#RUN apk add --no-cache bash
#COPY wait-for.sh /opt/lib/wait-for-it.sh
#RUN chmod +x /opt/lib/wait-for-it.sh
#ENTRYPOINT ["/usr/bin/java"]
#CMD ["-jar", "/opt/lib/conectorentrada.jar"]
#EXPOSE 8083
\ No newline at end of file
FROM alpine-jdk:base
COPY files/conectorsalida*.jar /opt/lib/conectorsalida.jar
#RUN apk add --no-cache bash
#COPY wait-for.sh /opt/lib/wait-for-it.sh
#RUN chmod +x /opt/lib/wait-for-it.sh
#ENTRYPOINT ["/usr/bin/java"]
#CMD ["-jar", "/opt/lib/conectorsalida.jar"]
#EXPOSE 8090
\ No newline at end of file
FROM alpine-jdk:base
COPY files/enriquecedor*.jar /opt/lib/enriquecedor.jar
#RUN apk add --no-cache bash
#COPY wait-for.sh /opt/lib/wait-for-it.sh
#RUN chmod +x /opt/lib/wait-for-it.sh
#ENTRYPOINT ["/usr/bin/java"]
#CMD ["-jar", "/opt/lib/conectorsalida.jar"]
#EXPOSE 8090
\ No newline at end of file
FROM alpine-jdk:base
COPY files/eureka.jar /opt/lib/
ENTRYPOINT ["/usr/bin/java"]
CMD ["-jar", "/opt/lib/eureka.jar"]
EXPOSE 8761
\ No newline at end of file
version: '2.2'
services:
mongo:
container_name: mongo
image: mongo:3
networks:
- plataforma_comunes
elasticsearch:
container_name: elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch:6.5.4
environment:
- http.host=0.0.0.0
- xpack.security.enabled=false
# - transport.host=localhost
# - network.host=0.0.0.0
# - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
mem_limit: 1g
memswap_limit: 1g
networks:
- plataforma_comunes
graylog:
container_name: graylog
image: graylog/graylog:2.5
environment:
# CHANGE ME (must be at least 16 characters)!
- GRAYLOG_PASSWORD_SECRET=somepasswordpepper
# Password: admin
- GRAYLOG_ROOT_PASSWORD_SHA2=8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918
- GRAYLOG_WEB_ENDPOINT_URI=http://127.0.0.1:9000/api
networks:
- plataforma_comunes
depends_on:
- mongo
- elasticsearch
ports:
# Graylog web interface and REST API
- 9000:9000
# Syslog TCP
- 514:514
# Syslog UDP
- 514:514/udp
# GELF TCP
- 12201:12201
# GELF UDP
- 12201:12201/udp
networks:
plataforma_comunes:
external: true
\ No newline at end of file
FROM alpine-jdk:base
COPY files/orquestador*.jar /opt/lib/orquestador.jar
#RUN apk add --no-cache bash
#COPY wait-for.sh /opt/lib/wait-for-it.sh
#RUN chmod +x /opt/lib/wait-for-it.sh
#ENTRYPOINT ["/usr/bin/java"]
#CMD ["-jar", "/opt/lib/orquestador.jar"]
#EXPOSE 8100
\ No newline at end of file
version: '2.2'
services:
orquestador:
container_name: orquestador
build:
context: .
dockerfile: orquestador
image: orquestador:latest
environment:
SPRING_APPLICATION_JSON: '{
"spring.profiles.active":"docker",
"spring.cloud.config.discovery.service-id": "configserver"
}'
command: ["-c","/opt/lib/wait-for-it.sh configserver:8888 && sleep 2 && /usr/bin/java -Xmx225m -Xms110m -jar /opt/lib/orquestador.jar"]
entrypoint: ["/bin/sh"]
mem_limit: 450m
memswap_limit: 450m
expose:
- "8100"
ports:
- "8100:8100"
networks:
- plataforma_comunes
- network_s1
conectorentrada:
container_name: conectorentrada
build:
context: .
dockerfile: conectorentrada
image: conectorentrada:latest
environment:
SPRING_APPLICATION_JSON: '{
"spring.profiles.active":"docker",
"spring.cloud.config.discovery.service-id":"configserver",
"server.servlet.session.timeout":"5m"
}'
command: ["-c","/opt/lib/wait-for-it.sh orquestador:8100 && sleep 2 && /usr/bin/java -Xmx500m -Xms250m -jar /opt/lib/conectorentrada.jar"]
entrypoint: ["/bin/sh"]
#mem_limit: 450m
#memswap_limit: 450m
expose:
- "8083"
ports:
- "8083:8083"
networks:
- "plataforma_comunes"
- "network_s1"
transformacionxmljson:
container_name: transformacionxmljson
build:
context: .
dockerfile: transformacionxmljson
image: transformacionxmljson:latest
environment:
SPRING_APPLICATION_JSON: '{
"spring.profiles.active":"docker",
"spring.cloud.config.discovery.service-id": "configserver"
}'
command: ["-c","/opt/lib/wait-for-it.sh configserver:8888 && sleep 2 && /usr/bin/java -Xmx200m -Xms125m -jar /opt/lib/transformacion.jar"]
entrypoint: ["/bin/sh"]
mem_limit: 400m
memswap_limit: 400m
expose:
- "8086"
ports:
- "8086:8086"
networks:
- plataforma_comunes
- network_s1
transformacionjsonxml:
container_name: transformacionjsonxml
build:
context: .
dockerfile: transformacionjsonxml
image: transformacionjsonxml:latest
environment:
SPRING_APPLICATION_JSON: '{
"spring.profiles.active":"docker",
"spring.cloud.config.discovery.service-id": "configserver"
}'
command: ["-c","/opt/lib/wait-for-it.sh transformacionxmljson:8086 && sleep 2 && /usr/bin/java -Xmx200m -Xms125m -jar /opt/lib/transformacion.jar"]
entrypoint: ["/bin/sh"]
mem_limit: 400m
memswap_limit: 400m
expose:
- "8085"
ports:
- "8085:8085"
networks:
- plataforma_comunes
- network_s1
conectorsalida:
container_name: conectorsalida
build:
context: .
dockerfile: conectorsalida
image: conectorsalida:latest
environment:
SPRING_APPLICATION_JSON: '{
"spring.profiles.active":"docker",
"spring.cloud.config.discovery.service-id": "configserver"
}'
command: ["-c","/opt/lib/wait-for-it.sh transformacionjsonxml:8085 && sleep 2 && /usr/bin/java -Xmx300m -Xms150m -jar /opt/lib/conectorsalida.jar"]
entrypoint: ["/bin/sh"]
mem_limit: 600m
memswap_limit: 600m
expose:
- "8090"
ports:
- "8090:8090"
networks:
- plataforma_comunes
- network_s1
enriquecedor:
container_name: enriquecedor
build:
context: .
dockerfile: enriquecedor
image: enriquecedor:latest
environment:
SPRING_APPLICATION_JSON: '{
"spring.profiles.active":"docker",
"spring.cloud.config.discovery.service-id": "configserver"
}'
command: ["-c","/opt/lib/wait-for-it.sh configserver:8888 && sleep 2 && /usr/bin/java -Xmx200m -Xms125m -jar /opt/lib/enriquecedor.jar"]
entrypoint: ["/bin/sh"]
mem_limit: 400m
memswap_limit: 400m
expose:
- "8088"
ports:
- "8088:8088"
networks:
- plataforma_comunes
- network_s1
clientefinalsoap:
container_name: clientefinalsoap
build:
context: .
dockerfile: clientefinalsoap
image: clientefinalsoap:latest
command: ["-c","/opt/lib/wait-for-it.sh enriquecedor:8088 && /usr/bin/java -Xmx200m -Xms125m -jar /opt/lib/clientefinalsoap.jar"]
entrypoint: ["/bin/sh"]
environment:
SPRING_APPLICATION_JSON: '{
"server.servlet.session.timeout":"5m"
}'
mem_limit: 400m
memswap_limit: 400m
expose:
- "9002"
ports:
- "9002:9002"
networks:
- network_s1
networks:
plataforma_comunes:
external: true
network_s1:
name: network_s1
driver: bridge
FROM alpine-jdk:base
COPY files/serverconfig*.jar /opt/lib/serverconfig.jar
#RUN apk add --no-cache bash
#COPY wait-for.sh /opt/lib/wait-for-it.sh
#RUN chmod +x /opt/lib/wait-for-it.sh
FROM alpine-jdk:base
#RUN apk add --no-cache bash
COPY files/transformacionjsonxml*.jar /opt/lib/transformacion.jar
#COPY wait-for.sh /opt/lib/wait-for-it.sh
#RUN chmod +x /opt/lib/wait-for-it.sh
#ENTRYPOINT ["/usr/bin/java"]
#CMD ["-jar", "/opt/lib/transformacion.jar"]
#EXPOSE 8084
\ No newline at end of file
FROM alpine-jdk:base
#RUN apk add --no-cache bash
COPY files/transformacionxmljson*.jar /opt/lib/transformacion.jar
#COPY wait-for.sh /opt/lib/wait-for-it.sh
#RUN chmod +x /opt/lib/wait-for-it.sh
#ENTRYPOINT ["/usr/bin/java"]
#CMD ["-jar", "/opt/lib/transformacion.jar"]
#EXPOSE 8084
\ No newline at end of file
#!/usr/bin/env bash
if [ "$#" -ne 1 ]; then
>&2 echo "Usage: $0 host:port"
exit -1
fi
ARGUMENT=$1
HOST="$(echo $ARGUMENT | cut -d ':' -f1)"
PORT="$(echo $ARGUMENT | cut -d ':' -f2)"
MAX_RETRY=90
echo "Testing connection to host $HOST and port $PORT."
count=0
while [ $count -lt $MAX_RETRY ]
do
count=$((count+1))
nc -z $HOST $PORT
result=$?
if [ $result -eq 0 ]; then
echo "Connection is available after $count second(s)."
exit 0
fi
echo "Retrying..."
sleep 4
done
>&2 echo "Timeout occurred after waiting $MAX_RETRY seconds for $HOST:$PORT."
exit -1
\ 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