Skip to content
This repository was archived by the owner on Feb 29, 2020. It is now read-only.

Commit 533363c

Browse files
authored
Merge pull request #13 from USGS-EROS/develop
4.3.0 Release
2 parents c5dc50b + 7cd7231 commit 533363c

File tree

4 files changed

+31
-16
lines changed

4 files changed

+31
-16
lines changed

Dockerfile

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
1-
from nginx:latest
2-
MAINTAINER USGS LCMAP http://eros.usgs.gov
1+
FROM centos:centos7
32

4-
RUN mkdir /usr/share/man/man1
5-
RUN apt-get update
6-
RUN apt-get install default-jdk curl vim -y
3+
RUN yum update -y
74

5+
## Install Java
6+
RUN yum install -y java-1.8.0-openjdk.x86_64 java-1.8.0-openjdk-devel.x86_64 java-1.8.0-openjdk-headless.x86_64
7+
8+
## Install NGINX
9+
ENV nginxversion="1.16.1-1" \
10+
os="centos" \
11+
osversion="7" \
12+
elversion="7"
13+
14+
RUN yum install -y wget openssl sed &&\
15+
yum -y autoremove &&\
16+
yum clean all &&\
17+
wget http://nginx.org/packages/$os/$osversion/x86_64/RPMS/nginx-$nginxversion.el$elversion.ngx.x86_64.rpm &&\
18+
rpm -iv nginx-$nginxversion.el$elversion.ngx.x86_64.rpm
19+
20+
## Install Mastodon
821
COPY resources/public/index.html /usr/share/nginx/html/index.html
922
COPY resources/public/js/compiled/mastodon_min.js /usr/share/nginx/html/js/compiled/mastodon_min.js
1023
COPY resources/public/js/jquery.min.js /usr/share/nginx/html/js/jquery.min.js
@@ -17,4 +30,7 @@ COPY project.clj /project.clj
1730
COPY target/lcmap-mastodon-*-standalone.jar /
1831

1932
RUN mkdir /data
33+
34+
# Run!
2035
CMD /startup.sh
36+

bin/build

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ BRANCH="${TRAVIS_BRANCH:-`git rev-parse --abbrev-ref HEAD | tr / -`}"
1414
echo Branch: $BRANCH
1515

1616
# ...same for the commit.
17-
COMMIT="${TRAVIS_COMMIT:-`git rev-parse HEAD`}"
17+
COMMIT=`git rev-parse --short HEAD`
1818
echo Commit: $COMMIT
1919

2020
# Version is extracted from project.clj so that a meaningful tag can
@@ -32,22 +32,20 @@ else
3232
exit 1
3333
fi
3434

35+
# Including the short commit SHA ensures uniquely identified builds
36+
# as its possible for users to commit changes without incrementing
37+
# version numbers, resulting new builds with the same tag
38+
BRANCH_TAG=$REPO:$BRANCH-$VERSION-$COMMIT
39+
echo "BRANCH_TAG: ${BRANCH_TAG}"
40+
3541
# Travis will build topic branches, but Docker images should not be
3642
# built for each one because this would result in a *lot* of images
3743
# during periods of active development.
3844
if [ "$BRANCH" == "master" ] || [ "$BRANCH" == "develop" ] ; then
3945

40-
# Using the commit SHA will ensure that built images persist on
41-
# Docker Hub unless explicitly removed. A more meaningful tag
42-
# is also created using the <branch>-<version> but that can be
43-
# superseded by subsequent builds.
44-
COMMIT_TAG=$REPO:$COMMIT
45-
BRANCH_TAG=$REPO:$BRANCH-$VERSION
46-
4746
echo "Building Docker image for $COMMIT_TAG ($BRANCH_TAG)"
4847
lein uberjar
49-
docker build -f Dockerfile -t $COMMIT_TAG .
50-
docker tag $COMMIT_TAG $BRANCH_TAG
48+
docker build -f Dockerfile -t $BRANCH_TAG .
5149
docker push $REPO
5250
echo "Building Docker image ... done"
5351

default.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
server {
22
listen 80;
33
server_name localhost;
4+
server_tokens off;
45

56
location / {
67
root /usr/share/nginx/html;

project.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(defproject lcmap-mastodon "4.2.4"
1+
(defproject lcmap-mastodon "4.3.0"
22
:description "Functions for LCMAP data curation"
33
:url "https://eros.usgs.gov"
44
:license {:name "Unlicense"

0 commit comments

Comments
 (0)