Skip to content

Commit 929fa0d

Browse files
authored
Merge pull request #421 from mpsonntag/docker
Docker changes
2 parents 1c02db9 + 7f7fd37 commit 929fa0d

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ cache:
77
- $HOME/.ivy2
88
- $HOME/.sbt
99
jdk:
10-
- oraclejdk7
10+
- oraclejdk8
1111
env:
1212
- ACTIVATOR_VERSION=1.3.7
1313
before_script:

Dockerfile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ ENV PATH /usr/local/activator-${ACTIVATOR_VERSION}-minimal:$PATH
1313

1414
# install to srv gca
1515
RUN mkdir -p /srv/gca
16+
RUN mkdir -p /srv/gca/figures
17+
RUN mkdir -p /srv/gca/figures_mobile
1618

1719
ADD app /srv/gca/app
1820
ADD conf /srv/gca/conf
@@ -25,6 +27,7 @@ ADD startup.sh /srv/gca
2527
ADD figures /srv/gca/figures
2628
ADD figures_mobile /srv/gca/figures_mobile
2729

30+
# only required for local tests
2831
RUN mkdir -p /srv/gca/db
2932
RUN echo "db.default.url=\"jdbc:h2:/srv/gca/db/gca-web\"" >> /srv/gca/conf/application.dev.conf
3033

@@ -33,13 +36,15 @@ WORKDIR /srv/gca
3336
# Required to get dependencies before running the startup script.
3437
RUN activator test stage
3538

39+
# Make sure we always have the latest routes file available
40+
# even if we use a config folder from outside the container.
41+
RUN mkdir -p /srv/tmp
42+
RUN cp /srv/gca/conf/routes /srv/tmp/routes
43+
3644
VOLUME ["/srv/gca/db"]
3745
VOLUME ["/srv/gca/conf"]
3846
VOLUME ["/srv/gca/figures"]
3947
VOLUME ["/srv/gca/figures_mobile"]
4048

4149
EXPOSE 9000
4250
ENTRYPOINT ["/bin/bash", "startup.sh"]
43-
44-
# Previous entrypoint using the staged binary
45-
#ENTRYPOINT ["target/universal/stage/bin/gca-web"]

startup.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
# Use tests to set up a database in a test environment
4-
activator test stage
5-
activator start
3+
cp /srv/tmp/routes /srv/gca/conf/routes
4+
5+
activator run
66

0 commit comments

Comments
 (0)