Browse Source

Refactory source tree

master
William Petit 6 months ago
parent
commit
4b75a2c58a
9 changed files with 27 additions and 11 deletions
  1. 9
    7
      Dockerfile
  2. 1
    1
      Makefile
  3. 0
    0
      geotiff_explorer.go
  4. 4
    1
      go.mod
  5. 13
    2
      go.sum
  6. 0
    0
      home.go
  7. 0
    0
      main.go
  8. 0
    0
      nomenclature_editor.go
  9. 0
    0
      tiff_optimizer.go

+ 9
- 7
Dockerfile View File

@@ -8,7 +8,7 @@ WORKDIR /src
8 8
 
9 9
 RUN go clean -v
10 10
 
11
-RUN make bin/tiff-optimizer
11
+RUN make bin/server
12 12
 
13 13
 FROM alpine:3.8
14 14
 
@@ -23,23 +23,25 @@ RUN echo "@edge http://nl.alpinelinux.org/alpine/edge/main" >> /etc/apk/reposito
23 23
 
24 24
 RUN apk add --no-cache bash libcrypto1.1@edge gdal@testing
25 25
 
26
-RUN adduser -S tiff-optimizer
26
+RUN adduser -S fieldnotes-server
27 27
 
28 28
 COPY misc/dokku/app.json "/app/app.json"
29 29
 COPY misc/dokku/Procfile "/app/Procfile"
30
-COPY --from=builder /src/bin/tiff-optimizer /app/bin/tiff-optimizer
30
+COPY --from=builder /src/bin/server /app/bin/server
31 31
 COPY static /app/static
32
+COPY template /app/template
33
+COPY schema /app/schema
32 34
 
33 35
 RUN chmod +x /app/bin/*
34
-RUN chown -R tiff-optimizer: /app\
36
+RUN chown -R fieldnotes-server: /app\
35 37
   && mkdir -p /data\
36
-  && chown -R tiff-optimizer: /data
38
+  && chown -R fieldnotes-server: /data
37 39
 
38
-USER tiff-optimizer
40
+USER fieldnotes-server
39 41
 
40 42
 EXPOSE 3000
41 43
 VOLUME /data
42 44
 
43 45
 WORKDIR /app
44 46
 
45
-CMD ["./bin/tiff-optimizer", "-tiff", "/data", "-static", "/app/static"]
47
+CMD ["./bin/server", "-tiff", "/data"]

+ 1
- 1
Makefile View File

@@ -14,7 +14,7 @@ run:
14 14
 		fieldnotes-server:latest
15 15
 
16 16
 bin/server:
17
-	CGO_ENABLED=0 go build -o ./bin/server ./cmd/server
17
+	CGO_ENABLED=0 go build -o ./bin/server ./
18 18
 
19 19
 server: bin/server
20 20
 	./bin/server

cmd/server/geotiff_explorer.go → geotiff_explorer.go View File


+ 4
- 1
go.mod View File

@@ -2,9 +2,12 @@ module forge.cadoles.com/Pyxis/fieldnotes-server
2 2
 
3 3
 require (
4 4
 	github.com/dannyvankooten/extemplate v0.0.0-20180818082729-efbdf6eacd7e
5
-	github.com/davecgh/go-spew v1.1.1
6 5
 	github.com/dchest/safefile v0.0.0-20151022103144-855e8d98f185
7 6
 	github.com/go-chi/chi v4.0.1+incompatible
8 7
 	github.com/pborman/uuid v1.2.0
9 8
 	github.com/qri-io/jsonschema v0.0.0-20190304170034-8d0aab861541
9
+	github.com/sergi/go-diff v1.0.0 // indirect
10
+	github.com/stretchr/testify v1.3.0 // indirect
11
+	golang.org/x/net v0.0.0-20190310074541-c10a0554eabf // indirect
12
+	golang.org/x/text v0.3.0 // indirect
10 13
 )

+ 13
- 2
go.sum View File

@@ -1,7 +1,7 @@
1 1
 github.com/dannyvankooten/extemplate v0.0.0-20180818082729-efbdf6eacd7e h1:B9dlwlvX/aw7ILWxPoCQxU86UDXUxQmKlsSYGO8QNcg=
2 2
 github.com/dannyvankooten/extemplate v0.0.0-20180818082729-efbdf6eacd7e/go.mod h1:1OaUZ894pZUQPj/84mS9XOztabi4FFJW46+rS7KjHTo=
3
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
4
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
3
+github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
4
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
5 5
 github.com/dchest/safefile v0.0.0-20151022103144-855e8d98f185 h1:3T8ZyTDp5QxTx3NU48JVb2u+75xc040fofcBaN+6jPA=
6 6
 github.com/dchest/safefile v0.0.0-20151022103144-855e8d98f185/go.mod h1:cFRxtTwTOJkz2x3rQUNCYKWC93yP1VKjR8NUhqFxZNU=
7 7
 github.com/go-chi/chi v4.0.1+incompatible h1:RSRC5qmFPtO90t7pTL0DBMNpZFsb/sHF3RXVlDgFisA=
@@ -10,7 +10,18 @@ github.com/google/uuid v1.0.0 h1:b4Gk+7WdP/d3HZH8EJsZpvV7EtDOgaZLtnaNGIu1adA=
10 10
 github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
11 11
 github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g=
12 12
 github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
13
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
14
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
13 15
 github.com/qri-io/jsonpointer v0.0.0-20190212172158-7f104febd1fd h1:A/otcrPitGkmouHBoyuvt7xFMVeGbNq2HLQGMgshdJE=
14 16
 github.com/qri-io/jsonpointer v0.0.0-20190212172158-7f104febd1fd/go.mod h1:DnJPaYgiKu56EuDp8TU5wFLdZIcAnb/uH9v37ZaMV64=
15 17
 github.com/qri-io/jsonschema v0.0.0-20190304170034-8d0aab861541 h1:03fNJCjKOTPGT0T40hX2UQ3nwq0Zqsl3wFgGwKjtUp4=
16 18
 github.com/qri-io/jsonschema v0.0.0-20190304170034-8d0aab861541/go.mod h1:rlnuSZCX0LfkXwEhqARuBp800hH8tKV/EtgeD3yVT8s=
19
+github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
20
+github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
21
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
22
+github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
23
+github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
24
+golang.org/x/net v0.0.0-20190310074541-c10a0554eabf h1:J7RqX9u0J9ZB37CGaFc2VC+QZZT6E6jnDbrboEFVo0U=
25
+golang.org/x/net v0.0.0-20190310074541-c10a0554eabf/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
26
+golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
27
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=

cmd/server/home.go → home.go View File


cmd/server/main.go → main.go View File


cmd/server/nomenclature_editor.go → nomenclature_editor.go View File


cmd/server/tiff_optimizer.go → tiff_optimizer.go View File


Loading…
Cancel
Save