Skip to content

Commit

Permalink
Remove wait-for-it script in Core Container
Browse files Browse the repository at this point in the history
Core will now wait for a database connection to get esablished
before attempting to serve any requests.
  • Loading branch information
aslakknutsen committed Sep 2, 2016
1 parent 355da37 commit 3c14178
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
8 changes: 2 additions & 6 deletions Dockerfile.deploy
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,10 @@ RUN useradd --no-create-home -s /bin/bash ${ALMIGHTY_USER_NAME}

COPY bin/alm ${ALMIGHTY_INSTALL_PREFIX}/bin/alm

# This script waits for a port to be open before it continues to execute what's
# behind the two dashes "--". See docker-compose.yaml for the place where we use this.
ADD https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh /usr/local/bin/wait-for-it.sh
RUN chmod +x /usr/local/bin/wait-for-it.sh

# From here onwards, any RUN, CMD, or ENTRYPOINT will be run under the following user
USER ${ALMIGHTY_USER_NAME}

ENTRYPOINT [ "${ALMIGHTY_INSTALL_PREFIX}/bin/alm" ]
WORKDIR ${ALMIGHTY_INSTALL_PREFIX}
ENTRYPOINT [ "bin/alm" ]

EXPOSE 8080
9 changes: 3 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,17 @@ version: '2'

services:
db:
image: postgres:9.5
image: centos/postgresql-95-centos7
ports:
- "5432:5432"
environment:
POSTGRES_PASSWORD: mysecretpassword
POSTGRESQL_ADMIN_PASSWORD: mysecretpassword
networks:
- default
core:
image: almightycore/almighty-core:latest
entrypoint:
- /usr/local/bin/wait-for-it.sh
- db:5432
- --
- /usr/bin/alm
- bin/alm
command: -dbhost db
ports:
- "8080:8080"
Expand Down

0 comments on commit 3c14178

Please sign in to comment.