Skip to content

Commit be104a2

Browse files
committed
ci: multi stage docker build
1 parent 2385ecc commit be104a2

File tree

15 files changed

+13
-263
lines changed

15 files changed

+13
-263
lines changed

Dockerfile

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# syntax=docker/dockerfile:1
22

3-
FROM golang:1.20
3+
FROM golang:1.20 AS builder
44

55
WORKDIR /jepp
66

@@ -20,4 +20,15 @@ RUN go build -o bin/jepp github.com/ecshreve/jepp/cmd/jepp
2020

2121
EXPOSE 8880
2222

23-
CMD [ "./bin/jepp" ]
23+
CMD [ "./bin/jepp" ]
24+
25+
FROM ubuntu:latest
26+
WORKDIR /
27+
COPY --from=builder /jepp/bin/jepp ./
28+
COPY --from=builder /jepp/data/sqlite/jepp.db ./data/sqlite/jepp.db
29+
COPY --from=builder /jepp/docs ./docs
30+
COPY --from=builder /jepp/static/site ./static/site
31+
COPY --from=builder /jepp/pkg ./pkg
32+
33+
EXPOSE 8880
34+
CMD [ "./jepp" ]

go.mod

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ go 1.20
55
require (
66
github.com/benbjohnson/clock v1.3.5
77
github.com/gin-gonic/gin v1.9.1
8-
github.com/gocolly/colly/v2 v2.1.0
98
github.com/jmoiron/sqlx v1.3.5
109
github.com/mattn/go-sqlite3 v1.14.17
1110
github.com/samsarahq/go/oops v0.0.0-20220211150445-4b291d6feac4
@@ -18,13 +17,8 @@ require (
1817

1918
require (
2019
github.com/KyleBanks/depth v1.2.1 // indirect
21-
github.com/PuerkitoBio/goquery v1.5.1 // indirect
2220
github.com/PuerkitoBio/purell v1.1.1 // indirect
2321
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
24-
github.com/andybalholm/cascadia v1.2.0 // indirect
25-
github.com/antchfx/htmlquery v1.2.3 // indirect
26-
github.com/antchfx/xmlquery v1.2.4 // indirect
27-
github.com/antchfx/xpath v1.1.8 // indirect
2822
github.com/bytedance/sonic v1.9.1 // indirect
2923
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
3024
github.com/davecgh/go-spew v1.1.1 // indirect
@@ -38,14 +32,10 @@ require (
3832
github.com/go-playground/universal-translator v0.18.1 // indirect
3933
github.com/go-playground/validator/v10 v10.14.0 // indirect
4034
github.com/go-sql-driver/mysql v1.7.1 // indirect
41-
github.com/gobwas/glob v0.2.3 // indirect
4235
github.com/goccy/go-json v0.10.2 // indirect
43-
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
44-
github.com/golang/protobuf v1.5.3 // indirect
4536
github.com/google/go-cmp v0.5.9 // indirect
4637
github.com/josharian/intern v1.0.0 // indirect
4738
github.com/json-iterator/go v1.1.12 // indirect
48-
github.com/kennygrant/sanitize v1.2.4 // indirect
4939
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
5040
github.com/kr/pretty v0.3.1 // indirect
5141
github.com/leodido/go-urn v1.2.4 // indirect
@@ -55,8 +45,6 @@ require (
5545
github.com/modern-go/reflect2 v1.0.2 // indirect
5646
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
5747
github.com/pmezard/go-difflib v1.0.0 // indirect
58-
github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca // indirect
59-
github.com/temoto/robotstxt v1.1.1 // indirect
6048
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
6149
github.com/ugorji/go/codec v1.2.11 // indirect
6250
golang.org/x/arch v0.3.0 // indirect
@@ -65,7 +53,6 @@ require (
6553
golang.org/x/sys v0.8.0 // indirect
6654
golang.org/x/text v0.9.0 // indirect
6755
golang.org/x/tools v0.7.0 // indirect
68-
google.golang.org/appengine v1.6.7 // indirect
6956
google.golang.org/protobuf v1.30.0 // indirect
7057
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
7158
gopkg.in/yaml.v2 v2.4.0 // indirect

go.sum

Lines changed: 0 additions & 102 deletions
Large diffs are not rendered by default.

pkg/models/data/jepp.db

-25.3 MB
Binary file not shown.

pkg/server/templates/dev/category.html.tpl

Lines changed: 0 additions & 5 deletions
This file was deleted.

pkg/server/templates/dev/clue-base.html.tpl

Lines changed: 0 additions & 32 deletions
This file was deleted.

pkg/server/templates/dev/clue.html.tpl

Lines changed: 0 additions & 8 deletions
This file was deleted.

pkg/server/templates/dev/debug.html.tpl

Lines changed: 0 additions & 4 deletions
This file was deleted.

pkg/server/templates/dev/game.html.tpl

Lines changed: 0 additions & 8 deletions
This file was deleted.

pkg/server/templates/dev/picker.html.tpl

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)