-
-
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.
feat: add Dockerfile and docker-compose (#112)
* feat: add Dockerfile and docker-compose * feat: integrating nginx with react nginx * fix: get config
- Loading branch information
1 parent
b162630
commit 16ceab0
Showing
24 changed files
with
368 additions
and
698 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,22 @@ | ||
power-sso | ||
powersso | ||
.vscode | ||
.public | ||
.github | ||
ui/ | ||
*.out | ||
*.proto | ||
nginx/ | ||
.git | ||
migrations/ | ||
*.sql | ||
**/*_test.go | ||
vendor/ | ||
.*ignore | ||
LICENSE | ||
golangci.yml | ||
Makefile | ||
*.md | ||
docker-compose.*.yml | ||
.env | ||
Dockerfile* |
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 |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
*.so | ||
*.dylib | ||
power-sso | ||
powersso | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
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,31 @@ | ||
FROM golang:1.19.4-alpine3.17 AS builder | ||
|
||
WORKDIR /app | ||
|
||
ENV CGO_ENABLED=0 GOOS=linux GOARCH=amd64 | ||
|
||
COPY . . | ||
|
||
RUN go get -d -v ./... | ||
RUN go install -v ./... | ||
RUN go build -v -o /bin/powersso . | ||
|
||
FROM alpine | ||
|
||
ENV TZ=America/Fortaleza | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=builder /bin/powersso . | ||
|
||
RUN apk add tzdata ca-certificates && \ | ||
adduser -D --uid 1000 userpowersso userpowersso && \ | ||
mkdir -p /var/log/powersso && \ | ||
chown userpowersso:userpowersso /var/log/powersso -R && \ | ||
chown userpowersso:userpowersso /app | ||
|
||
EXPOSE 5000 5555 | ||
|
||
USER userpowersso | ||
|
||
CMD ["./powersso"] |
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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"meta": { | ||
"project_name": "PowerSSO", | ||
"project_url": "http://localhost:3000" | ||
}, | ||
"server": { | ||
"version": "1.0.0", | ||
"port": ":5000", | ||
"pprof_port": ":5555", | ||
"mode": "dev", | ||
"jwt_secret_key": "power-sso-secret", | ||
"cookie_name": "jwt-power-sso", | ||
"ssl": false, | ||
"ctx_default_timeout": 12, | ||
"read_timeout": 5, | ||
"write_timeout": 5, | ||
"srf": true, | ||
"debug": false, | ||
"start_http": true, | ||
"start_grpc": true, | ||
"access_log_directory": "/var/log/powersso/access.log", | ||
"error_log_directory": "/var/log/powersso/error.log", | ||
"permission_base": "github.com/isaqueveras/power-sso" | ||
}, | ||
"database": { | ||
"host": "postgesql", | ||
"port": 5432, | ||
"user": "postgres", | ||
"password": "postgres", | ||
"dbname": "power-sso", | ||
"sslmode": false, | ||
"driver": "pgx", | ||
"max_open_conns": 60, | ||
"max_idle_conns": 30, | ||
"conn_max_life_time": 120, | ||
"conn_max_idle_time": 20, | ||
"timeout": 2 | ||
}, | ||
"logger": { | ||
"development": true, | ||
"disable_caller": false, | ||
"disable_stacktrace": false, | ||
"encoding": "json", | ||
"level": "info" | ||
}, | ||
"mailer": { | ||
"host": "localhost", | ||
"port": 1025, | ||
"email": "[email protected]", | ||
"username": "PowerSSO", | ||
"password": "password", | ||
"tls": false | ||
}, | ||
"user_auth_token": { | ||
"secret_key": "kjnfdjksdbfsdhfbdskjfnamkndkn", | ||
"duration": 2592000 | ||
} | ||
} | ||
|
||
|
||
|
||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
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
Oops, something went wrong.
16ceab0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
power-sso – ./
power-sso-git-main-isaqueveras.vercel.app
power-sso.vercel.app
power-sso-isaqueveras.vercel.app