Created
September 12, 2016 22:41
-
-
Save dadair-ca/4a6788002de7f96f5c075c84570015b0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "2" | |
services: | |
api: | |
build: | |
context: api | |
dockerfile: Dockerfile-dev | |
restart: "always" | |
volumes: | |
- "./api/src:/app/src" | |
ports: | |
- "80:3000" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM clojure | |
RUN mkdir -p /app | |
COPY ./dev /app/dev | |
COPY ./profiles.clj /app/profiles.clj | |
COPY ./project.clj /app/project.clj | |
COPY ./resources /app/resources | |
COPY ./src /app/src | |
WORKDIR /app | |
# fetch dependencies and build the runnable uberjar | |
RUN lein deps | |
RUN mv "$(lein uberjar | sed -n 's/^Created \(.*standalone\.jar\)/\1/p')" /app/app-standalone.jar | |
EXPOSE 3000 | |
# run the uberjar | |
CMD ["java", "-jar", "app-standalone.jar"] | |
VOLUME /app/src /app/dev |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment