Skip to content

Commit

Permalink
Docker publish preparation (#630)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgresty authored Feb 19, 2020
1 parent 86c3090 commit fa8d75a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
20 changes: 15 additions & 5 deletions docker/styx-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,32 @@ ARG STYX_IMAGE=https://github.com/HotelsDotCom/styx/releases/download/${STYX_VER
ENV APP_HOME=/styx

ENV STYX_CONFIG=/styx/default-config/default.yml
ENV STYX_LOG_CONFIG=/styx/styx/conf/logback.xml
ENV STYX_LOG_CONFIG=/styx/conf/logback.xml
ENV STYX_ENV_FILE=/styx/default-config/styx-env.sh
ENV STYX_LOG_OUTPUT=/styx/logs/

RUN addgroup styx && useradd -d /home/styx -g styx -s /bin/bash styx

# Remove overriding ulimits
RUN rm -f /etc/security/limits.d/*

ADD ${STYX_IMAGE} /styx.zip
RUN unzip /styx.zip \
&& rm /styx.zip

WORKDIR ${APP_HOME}

ADD ${STYX_IMAGE} ${APP_HOME}/styx.zip
ADD default-docker.yml /styx/default-config/default.yml
ADD styx-env.sh /styx/default-config/styx-env.sh
ADD origins.yml /styx/default-config/origins.yml

RUN unzip styx.zip \
&& rm styx.zip
RUN mkdir -p ${STYX_LOG_OUTPUT}
RUN chown styx:styx ${STYX_LOG_OUTPUT}

EXPOSE 8080 8443 9000

USER styx

CMD ["/styx/default-config/default.yml"]

ENTRYPOINT ["styx/bin/startup"]
ENTRYPOINT ["bin/startup"]
4 changes: 2 additions & 2 deletions docker/styx-image/styx-env.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
# Copyright (C) 2013-2019 Expedia Inc.
# Copyright (C) 2013-2020 Expedia Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -22,7 +22,7 @@
JVM_DIRECT_MEMORY="${JVM_DIRECT_MEMORY:=-XX:MaxDirectMemorySize=512m}"
JVM_HEAP_OPTS="${JVM_HEAP_OPTS:=-XX:+AlwaysPreTouch}"

JVM_GC_LOG="${JVM_GC_LOG:=-XX:+PrintGCDetails -Xloggc:/styx/logs/gc.log.$(/bin/date +%Y-%m-%d-%H%M%S)}"
JVM_GC_LOG="${JVM_GC_LOG:=-XX:+PrintGCDetails -Xloggc:${APP_HOME}/logs/gc.log.$(/bin/date +%Y-%m-%d-%H%M%S)}"
JVM_HEAP_DUMP="${JVM_HEAP_DUMP:=-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/tmp}"

# Set java VM type
Expand Down

0 comments on commit fa8d75a

Please sign in to comment.