-
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.
fix: Backward compatibility for header
X-Real-IP
, move Dockerfile
…
… to `package` directory
- Loading branch information
afifurrohman-id
committed
Dec 8, 2023
1 parent
ae9823f
commit 2454dd6
Showing
9 changed files
with
56 additions
and
29 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 |
---|---|---|
|
@@ -26,15 +26,15 @@ jobs: | |
|
||
- uses: hadolint/[email protected] | ||
with: | ||
dockerfile: build/Dockerfile | ||
dockerfile: build/package/Dockerfile | ||
|
||
- uses: hadolint/[email protected] | ||
with: | ||
dockerfile: build/Dockerfile.test | ||
dockerfile: build/package/Dockerfile.test | ||
|
||
- name: Unit testing # Using staging environment | ||
run: | | ||
docker build -t ${{github.event.repository.name}} -f build/Dockerfile.test . | ||
docker build -t ${{github.event.repository.name}} -f build/package/Dockerfile.test . | ||
docker run --rm --name ${{github.event.repository.owner.login}} --add-host=host.docker.internal:host-gateway -e GOOGLE_CLOUD_STORAGE_SERVICE_ACCOUNT -e GOOGLE_CLOUD_STORAGE_BUCKET -e SERVER_URI -e GOOGLE_OAUTH2_REFRESH_TOKEN_TEST -e APP_ENV -e PORT -e GOOGLE_OAUTH2_CLIENT_ID_TEST -e GOOGLE_OAUTH2_CLIENT_SECRET_TEST ${{github.event.repository.name}} go test -v --cover -ldflags '-w -s' ./... | ||
|
@@ -75,7 +75,7 @@ jobs: | |
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: build/Dockerfile | ||
file: build/package/Dockerfile | ||
push: true | ||
tags: | | ||
${{env.IMAGE_NAME}}:${{github.sha}} | ||
|
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 |
---|---|---|
|
@@ -26,18 +26,18 @@ jobs: | |
|
||
- uses: hadolint/[email protected] | ||
with: | ||
dockerfile: build/Dockerfile | ||
dockerfile: build/package/Dockerfile | ||
|
||
- uses: hadolint/[email protected] | ||
with: | ||
dockerfile: build/Dockerfile.test | ||
dockerfile: build/package/Dockerfile.test | ||
|
||
- name: Run Docker Compose | ||
run: docker compose -f deployments/compose.yaml up -d | ||
|
||
- name: Unit testing | ||
run: | | ||
docker build -t ${{github.event.repository.name}} -f build/Dockerfile.test . | ||
docker build -t ${{github.event.repository.name}} -f build/package/Dockerfile.test . | ||
docker run --rm --name ${{github.event.repository.owner.login}} --add-host=host.docker.internal:host-gateway -e GOOGLE_CLOUD_STORAGE_SERVICE_ACCOUNT -e GOOGLE_CLOUD_STORAGE_BUCKET -e SERVER_URI -e GOOGLE_CLOUD_STORAGE_EMULATOR_ENDPOINT -e GOOGLE_OAUTH2_REFRESH_TOKEN_TEST -e PORT -e GOOGLE_OAUTH2_CLIENT_ID_TEST -e GOOGLE_OAUTH2_CLIENT_SECRET_TEST ${{github.event.repository.name}} go test -v --cover -ldflags '-w -s' ./... | ||
|
@@ -79,7 +79,7 @@ jobs: | |
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: build/Dockerfile | ||
file: build/package/Dockerfile | ||
push: true | ||
tags: | | ||
${{env.IMAGE_NAME}}:${{github.sha}} | ||
|
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
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ FROM golang:1.20-alpine | |
|
||
WORKDIR /src | ||
|
||
COPY . . | ||
COPY .. . | ||
|
||
ENV CGO_ENABLED=0 | ||
|
||
|
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
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
Submodule web
updated
11 files
+27 −13 | .github/workflows/deploy.yaml | |
+1 −1 | README.md | |
+9 −7 | build/package/Dockerfile | |
+1 −1 | cmd/client/auth.go | |
+1 −1 | cmd/client/forwarder.go | |
+1 −1 | cmd/client/get.go | |
+1 −1 | cmd/client/middleware/auth.go | |
+9 −9 | go.mod | |
+14 −44 | go.sum | |
+3 −3 | main.go | |
+4 −2 | web/static/styles/pages/index.css |