Skip to content

Commit

Permalink
improve (#1216)
Browse files Browse the repository at this point in the history
Co-authored-by: root <[email protected]>
  • Loading branch information
dmsolr and root authored Apr 2, 2021
1 parent 57d868f commit 740c732
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 4 deletions.
15 changes: 12 additions & 3 deletions soul-dist/soul-admin-dist/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,22 @@
# limitations under the License.

FROM java:openjdk-8-jre-alpine

ARG APP_NAME
ENV SPRING_PROFILES_ACTIVE h2

ARG SPRING_PROFILES_ACTIVE
ENV SPRING_PROFILES_ACTIVE=${SPRING_PROFILES_ACTIVE:-h2}

ENV LOCAL_PATH /opt/soul-admin

ADD target/${APP_NAME}.tar.gz /opt
RUN mv /opt/${APP_NAME} ${LOCAL_PATH}

COPY entrypoint.sh ${LOCAL_PATH}/entrypoint.sh
RUN chmod +x ${LOCAL_PATH}/entrypoint.sh

WORKDIR /opt/soul-admin

EXPOSE 9095
ENTRYPOINT /bin/sh ${LOCAL_PATH}/bin/start.sh && tail -f ${LOCAL_PATH}/logs/soul-admin.out

ENTRYPOINT ["/bin/sh", "entrypoint.sh"]
21 changes: 21 additions & 0 deletions soul-dist/soul-admin-dist/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

[[ -d ./conf-ext ]] && cp -f ./conf-ext/* ./conf

/bin/sh ${LOCAL_PATH}/bin/start.sh && tail -f ${LOCAL_PATH}/logs/soul-admin.out
11 changes: 10 additions & 1 deletion soul-dist/soul-bootstrap-dist/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,17 @@ FROM java:openjdk-8-jre-alpine
ARG APP_NAME
ENV LOCAL_PATH /opt/soul-bootstrap

ARG SPRING_PROFILES_ACTIVE
ENV SPRING_PROFILES_ACTIVE=${SPRING_PROFILES_ACTIVE:-local}

ADD target/${APP_NAME}.tar.gz /opt
RUN mv /opt/${APP_NAME} ${LOCAL_PATH}

COPY entrypoint.sh ${LOCAL_PATH}/entrypoint.sh
RUN chmod +x ${LOCAL_PATH}/entrypoint.sh

WORKDIR ${LOCAL_PATH}

EXPOSE 9195
ENTRYPOINT /bin/sh ${LOCAL_PATH}/bin/start.sh && tail -f ${LOCAL_PATH}/logs/soul-bootstrap.out

ENTRYPOINT ["/bin/sh", "entrypoint.sh"]
21 changes: 21 additions & 0 deletions soul-dist/soul-bootstrap-dist/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

[[ -d ./conf-ext ]] && cp -f ./conf-ext/* ./conf

/bin/sh ${LOCAL_PATH}/bin/start.sh && tail -f ${LOCAL_PATH}/logs/soul-bootstrap.out

0 comments on commit 740c732

Please sign in to comment.