Skip to content

Commit

Permalink
[docker] Provide config from container outside
Browse files Browse the repository at this point in the history
  • Loading branch information
mpsonntag committed Sep 10, 2018
1 parent 84535f3 commit 15240aa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Dockerfile
Expand Up @@ -21,15 +21,21 @@ ADD project/build.properties /srv/gca/project/
ADD public /srv/gca/public
ADD test /srv/gca/test
ADD build.sbt /srv/gca/
ADD startup.sh /srv/gca

RUN mkdir -p /srv/gca/db
RUN echo "db.default.url=\"jdbc:h2:/srv/gca/db/gca-web\"" >> /srv/gca/conf/application.dev.conf

# test and stage
WORKDIR /srv/gca
# Required to get dependencies before running the startup script.
RUN activator test stage

VOLUME ["/srv/gca/db"]
VOLUME ["/srv/gca/conf"]

EXPOSE 9000
ENTRYPOINT ["target/universal/stage/bin/gca-web"]
ENTRYPOINT ["/bin/bash", "startup.sh"]

# Previous entrypoint using the staged binary
#ENTRYPOINT ["target/universal/stage/bin/gca-web"]
6 changes: 6 additions & 0 deletions startup.sh
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

# Use tests to set up a database in a test environment
activator test stage
activator start

0 comments on commit 15240aa

Please sign in to comment.