Skip to content

Commit

Permalink
Merge pull request #112 from TheConnMan/enhancement/docker-compose
Browse files Browse the repository at this point in the history
Docker Compose
  • Loading branch information
dularion committed Jan 2, 2016
2 parents 7f6f6fc + fbb7134 commit 5fa9c75
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 166 deletions.
26 changes: 26 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM java:8-jdk

WORKDIR /usr/lib/java

ENV GRAILS_VERSION 2.4.4

RUN wget https://github.com/grails/grails-core/releases/download/v${GRAILS_VERSION}/grails-${GRAILS_VERSION}.zip
RUN unzip grails-${GRAILS_VERSION}.zip
RUN rm -rf grails-${GRAILS_VERSION}.zip
RUN ln -s grails-${GRAILS_VERSION} grails

ENV GRAILS_HOME /usr/lib/java/grails
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
ENV PATH $GRAILS_HOME/bin:$PATH

RUN mkdir /app
COPY . /app
WORKDIR /app

RUN grails compile

EXPOSE 8080

ENTRYPOINT ["grails"]

CMD ["-Dgrails.env=docker", "run-app"]
17 changes: 0 additions & 17 deletions Dockerfile/tomcat/Dockerfile

This file was deleted.

7 changes: 0 additions & 7 deletions Dockerfile/tomcat/bin/setenv.sh

This file was deleted.

141 changes: 0 additions & 141 deletions Dockerfile/tomcat/conf/server.xml

This file was deleted.

14 changes: 14 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
db:
image: mysql:latest
environment:
- MYSQL_DATABASE=streama
- MYSQL_USER=streama
- MYSQL_PASSWORD=streama
- MYSQL_RANDOM_ROOT_PASSWORD=yes

streama:
build: .
links:
- db:db
ports:
- 8080:8080
2 changes: 1 addition & 1 deletion grails-app/conf/DataSource.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ environments {

//DEV
String host = System.getenv('MYSQL_HOST')
if(!host) host = "mysql"
if(!host) host = "db"
String port = System.getenv('MYSQL_PORT')
if(!port) port = "3306"
String db = System.getenv('MYSQL_DB')
Expand Down

0 comments on commit 5fa9c75

Please sign in to comment.