Skip to content

Commit 121d666

Browse files
authored
Merge pull request #19 from create-go-app/dev
Update dependencies
2 parents 9e25e7c + 546fa2c commit 121d666

File tree

7 files changed

+11
-14
lines changed

7 files changed

+11
-14
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ JWT_SECRET_KEY="secret"
88
JWT_REFRESH_KEY="refresh"
99

1010
# Database settings:
11-
DB_HOST="localhost"
11+
DB_HOST="cgapp-postgres"
1212
DB_PORT=5432
1313
DB_USER="postgres"
1414
DB_PASSWORD="password"

Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,5 @@ FROM scratch
1919
# Copy binary and config files from /build to root folder of scratch container.
2020
COPY --from=builder ["/build/apiserver", "/build/.env", "/"]
2121

22-
# Export necessary port.
23-
EXPOSE 5000
24-
2522
# Command to run when starting the container.
2623
ENTRYPOINT ["/apiserver"]

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
APP_NAME = apiserver
44
BUILD_DIR = $(PWD)/build
55
MIGRATIONS_FOLDER = $(PWD)/platform/migrations
6-
DATABASE_URL = postgres://postgres:password@localhost/postgres?sslmode=disable
6+
DATABASE_URL = postgres://postgres:password@cgapp-postgres/postgres?sslmode=disable
77

88
clean:
99
rm -rf ./build
@@ -42,18 +42,18 @@ docker.network:
4242
docker.run: docker.network docker.postgres swag docker.net_http migrate.up
4343

4444
docker.stop:
45-
docker stop dev-net_http dev-postgres
45+
docker stop cgapp-net_http cgapp-postgres
4646

4747
docker.net_http: docker.build
4848
docker run --rm -d \
49-
--name dev-net_http \
49+
--name cgapp-net_http \
5050
--network dev-network \
5151
-p 5000:5000 \
5252
net_http-go-template
5353

5454
docker.postgres:
5555
docker run --rm -d \
56-
--name dev-postgres \
56+
--name cgapp-postgres \
5757
--network dev-network \
5858
-e POSTGRES_USER=postgres \
5959
-e POSTGRES_PASSWORD=password \

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ make docker.run
4949
| [jackc/pgx](https://github.com/jackc/pgx) | `v4.11.0` | database |
5050
| [swaggo/swag](https://github.com/swaggo/swag) | `v1.7.0` | utils |
5151
| [google/uuid](https://github.com/google/uuid) | `v1.2.0` | utils |
52-
| [go-playground/validator](https://github.com/go-playground/validator) | `v10.5.0` | utils |
52+
| [go-playground/validator](https://github.com/go-playground/validator) | `v10.6.0` | utils |
5353

5454
## 🗄 Template structure
5555

@@ -97,7 +97,7 @@ JWT_SECRET_KEY="secret"
9797
JWT_REFRESH_KEY="refresh"
9898

9999
# Database settings:
100-
DB_HOST="localhost"
100+
DB_HOST="cgapp-postgres"
101101
DB_PORT=5432
102102
DB_USER="postgres"
103103
DB_PASSWORD="password"

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require (
66
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751
77
github.com/auth0/go-jwt-middleware v1.0.0
88
github.com/dgrijalva/jwt-go v3.2.0+incompatible
9-
github.com/go-playground/validator/v10 v10.5.0
9+
github.com/go-playground/validator/v10 v10.6.0
1010
github.com/google/uuid v1.2.0
1111
github.com/gorilla/mux v1.8.0
1212
github.com/jackc/pgx/v4 v4.11.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8c
101101
github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
102102
github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no=
103103
github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA=
104-
github.com/go-playground/validator/v10 v10.5.0 h1:X9rflw/KmpACwT8zdrm1upefpvdy6ur8d1kWyq6sg3E=
105-
github.com/go-playground/validator/v10 v10.5.0/go.mod h1:xm76BBt941f7yWdGnI2DVPFFg1UK3YY04qifoXU3lOk=
104+
github.com/go-playground/validator/v10 v10.6.0 h1:UGIt4xR++fD9QrBOoo/ascJfGe3AGHEB9s6COnss4Rk=
105+
github.com/go-playground/validator/v10 v10.6.0/go.mod h1:xm76BBt941f7yWdGnI2DVPFFg1UK3YY04qifoXU3lOk=
106106
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
107107
github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs=
108108
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"github.com/create-go-app/net_http-go-template/pkg/utils"
77
"github.com/gorilla/mux"
88

9-
_ "github.com/create-go-app/net_http-go-template/docs" //
9+
_ "github.com/create-go-app/net_http-go-template/docs" // load Swagger docs
1010
_ "github.com/joho/godotenv/autoload" // load .env file automatically
1111
)
1212

0 commit comments

Comments
 (0)