Skip to content

Commit

Permalink
Merge pull request #5 from containerum/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
MargoTuleninova authored Sep 3, 2018
2 parents 3de4767 + f6244cc commit 72799c4
Show file tree
Hide file tree
Showing 135 changed files with 14,461 additions and 11,243 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
.git
.idea
7 changes: 4 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ variables:
SECRET: gitlab-registry
REPOSITORY: ${CI_REGISTRY}/${CI_PROJECT_PATH}
SAND_PG_PASS: "ohpeize7IC7AeVoo"
PROJECT: solutions

.docker-login: &docker-login
before_script:
Expand Down Expand Up @@ -55,8 +56,8 @@ dev-deploy:
environment:
name: develop
script:
- cd deploy
- helm upgrade --install --namespace=${NAMESPACE} ${CI_PROJECT_NAME} --set image.tag=${CI_COMMIT_SHA:0:8} --set image.repository=${REPOSITORY} --set environment=develop --values values.yaml --values env/develop.yaml .
- cd charts/solutions
- helm upgrade --install --debug --namespace=${NAMESPACE} ${PROJECT} --set image.tag=${CI_COMMIT_SHA:0:8} --set image.secret=${SECRET} --set image.repository=${REPOSITORY} --set service.externalIP=88.99.247.59 --set env.local.CH_SOLUTIONS_PG_PASSWORD=${SAND_PG_PASS} --set tags.db=false --values values.yaml .
only:
- develop

Expand Down Expand Up @@ -91,4 +92,4 @@ pub-github:
- git push -u github pub:develop --force
- git remote rm github
only:
- develop
- develop
24 changes: 20 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
FROM golang:1.10-alpine as builder
WORKDIR /go/src/git.containerum.net/ch/solutions
RUN apk add --update make git
WORKDIR src/git.containerum.net/ch/solutions
COPY . .
WORKDIR cmd/solutions
RUN CGO_ENABLED=0 go build -v -ldflags="-w -s -extldflags '-static'" -tags="jsoniter" -o /bin/solutions
RUN VERSION=$(git describe --abbrev=0 --tags) make build-for-docker

FROM alpine:3.7 as alpine
RUN apk --no-cache add tzdata zip ca-certificates
WORKDIR /usr/share/zoneinfo
# -0 means no compression. Needed because go's
# tz loader doesn't handle compressed data.
RUN zip -r -0 /zoneinfo.zip .

FROM alpine:3.7

RUN apk --no-cache add tzdata ca-certificates
# app
COPY --from=builder /bin/solutions /
COPY --from=builder /tmp/solutions /
# migrations
COPY pkg/migrations /migrations
# timezone data
ENV ZONEINFO /zoneinfo.zip
COPY --from=alpine /zoneinfo.zip /
# tls certificates
COPY --from=alpine /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/

ENV CH_SOLUTIONS="impl" \
CH_SOLUTIONS_MIGRATIONS_PATH="migrations" \
CH_SOLUTIONS_TEXTLOG="true" \
Expand All @@ -22,5 +36,7 @@ ENV CH_SOLUTIONS="impl" \
CH_SOLUTIONS_PG_NOSSL=true \
CH_SOLUTIONS_KUBE_API_URL="http://kube-api:1214" \
CH_SOLUTIONS_RESOURCE_URL="http://resource-service:1213"

EXPOSE 6767

ENTRYPOINT ["/solutions"]
Loading

0 comments on commit 72799c4

Please sign in to comment.