forked from chartmuseum/ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request chartmuseum#19 from jdolitsky/local-dev-fixes
Local dev fixes
- Loading branch information
Showing
10 changed files
with
63 additions
and
54 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.idea/ | ||
charts/ | ||
ui |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,32 @@ | ||
FROM library/golang | ||
# | ||
# Stage 1 | ||
# | ||
FROM library/golang:1 as builder | ||
|
||
# Godep for vendoring | ||
RUN go get github.com/tools/godep | ||
|
||
# Recompile the standard library without CGO | ||
RUN CGO_ENABLED=0 go install -a std | ||
|
||
ENV APP_DIR $GOPATH/src/quickstart | ||
ENV APP_DIR $GOPATH/src/github.com/chartmuseum/ui | ||
RUN mkdir -p $APP_DIR | ||
|
||
# Set the entrypoint | ||
ENTRYPOINT (cd $APP_DIR && ./quickstart) | ||
ADD . $APP_DIR | ||
|
||
# Compile the binary and statically link | ||
RUN cd $APP_DIR && CGO_ENABLED=0 godep go build -ldflags '-d -w -s' | ||
|
||
EXPOSE 8080 | ||
|
||
|
||
RUN cd $APP_DIR && \ | ||
CGO_ENABLED=0 godep go build -ldflags '-w -s' -o /chartmuseum-ui && \ | ||
cp -r views/ /views && \ | ||
cp -r static/ /static | ||
|
||
# | ||
# Stage 2 | ||
# | ||
FROM alpine:3.8 | ||
RUN apk add --no-cache curl cifs-utils ca-certificates \ | ||
&& adduser -D -u 1000 chartmuseum | ||
COPY --from=builder /chartmuseum-ui /chartmuseum-ui | ||
COPY --from=builder /views /views | ||
COPY --from=builder /static /static | ||
USER 1000 | ||
ENTRYPOINT ["/chartmuseum-ui"] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
appname = quickstart | ||
appname = ui | ||
httpport = 8080 | ||
runmode = dev |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,20 @@ | ||
version: '3.4' | ||
|
||
version: '2.0' | ||
services: | ||
ui: | ||
image: idobry/chartmuseumui:0.0.4 | ||
environment: | ||
CHART_MUSESUM_URL: "http://chartmuseum:8080" | ||
AUTHENTICATION: "true" | ||
DB_HOST: postgres | ||
DB_USER: user | ||
DB_PASSWORD: user | ||
DB_NAME: db | ||
ports: | ||
- 9090:8080 | ||
|
||
chartmuseum: | ||
image: chartmuseum/chartmuseum:latest | ||
volumes: | ||
- ~/.aws:/root/.aws:ro | ||
restart: always | ||
environment: | ||
ui: | ||
build: ./ | ||
#image: idobry/chartmuseumui:latest | ||
environment: | ||
CHART_MUSESUM_URL: http://chartmuseum:8080 | ||
ports: | ||
- 3000:8080 | ||
chartmuseum: | ||
image: chartmuseum/chartmuseum:v0.7.1 | ||
ports: | ||
- 8080:8080 | ||
volumes: | ||
- ./charts:/charts | ||
environment: | ||
PORT: 8080 | ||
DEBUG: 1 | ||
STORAGE: "amazon" | ||
STORAGE_AMAZON_BUCKET: "imisight-chartmuseum" | ||
STORAGE_AMAZON_PREFIX: "" | ||
STORAGE_AMAZON_REGION: "eu-west-1" | ||
ports: | ||
- 8080:8080 | ||
|
||
postgres: | ||
image: postgres | ||
restart: always | ||
environment: | ||
POSTGRES_PASSWORD: user | ||
POSTGRES_USER: user | ||
POSTGRES_DB: db | ||
STORAGE: local | ||
STORAGE_LOCAL_ROOTDIR: /charts |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
package main | ||
|
||
import ( | ||
_ "quickstart/routers" | ||
_ "github.com/chartmuseum/ui/routers" | ||
|
||
"github.com/astaxie/beego" | ||
) | ||
|
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
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