Permalink
Browse files

added scripts and dockerfiles

  • Loading branch information...
harlanji committed Mar 5, 2018
1 parent 938535e commit a648a710877d5926ac5b8e38aa19b485e9f55b96
@@ -0,0 +1,7 @@
FROM cryogen:8-jdk_1.8_2.8.1

ADD app/project.clj /tmp/app/project.clj
RUN lein deps

RUN rm -rf /tmp/app
ADD app /tmp/app
@@ -0,0 +1,10 @@
FROM alpine

RUN apk update && apk upgrade && apk add python

WORKDIR /tmp/http
ADD app/resources/public /tmp/http

EXPOSE 9090

CMD ["python", "-m", "SimpleHTTPServer", "9090"]
@@ -0,0 +1,5 @@
#!/bin/bash

source scripts/env.sh

docker build -t $IMAGE .
@@ -0,0 +1,6 @@
#!/bin/bash

source scripts/env.sh

docker build -t $IMAGE_STATIC_LOCAL -f Dockerfile.static .
docker tag $IMAGE_STATIC_LOCAL $IMAGE_STATIC
@@ -0,0 +1,18 @@
#!/bin/bash

# use with source

IMAGE=harlanji-build
NAME=harlanji-build
DEV_PORT=34000
STATIC_PORT=34080


DOMAIN=harlanji.com
HOSTS=#$DOMAIN


NAME_STATIC=harlanji-static
IMAGE_STATIC_LOCAL=harlanji-static

IMAGE_STATIC=docker-registry.local:5000/harlanji.com/harlanji-static:1
@@ -0,0 +1,3 @@
#!/bin/bash

scripts/build-static.sh && (scripts/stop-static.sh ; scripts/start-static.sh)
@@ -0,0 +1,8 @@
#!/bin/bash

source scripts/env.sh

docker run -d --restart always \
-v $PWD/app:/tmp/app \
--name $NAME -p $DEV_PORT:3000 \
$IMAGE
@@ -0,0 +1,9 @@
#!/bin/bash

source scripts/env.sh


docker run -d --restart always \
--name $NAME_STATIC \
-p $STATIC_PORT:9090 \
$IMAGE_STATIC
@@ -0,0 +1,5 @@
#!/bin/bash

source scripts/env.sh

docker rm -f $NAME
@@ -0,0 +1,5 @@
#!/bin/bash

source scripts/env.sh

docker rm -f $NAME_STATIC
@@ -0,0 +1,5 @@
#!/bin/bash

source scripts/env.sh

docker logs --since=1m --follow $NAME

0 comments on commit a648a71

Please sign in to comment.