Skip to content

Commit 45401e6

Browse files
naeemaeiHamed Naeemaei
and
Hamed Naeemaei
authored
Update readme file(9001 -> 9002) (#13)
Close #12 Add goproxy fix libc problem to build web API docker file Co-authored-by: Hamed Naeemaei <h.naeemaei@asanpardakht.ir>
1 parent dfae5b0 commit 45401e6

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

Readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,10 @@ curl -X 'POST' \
124124
docker compose -f "docker/docker-compose.yml" up -d --build
125125
```
126126

127-
#### Web API Run in docker [http://localhost:9001](http://localhost:9001)
127+
#### Web API Run in docker [http://localhost:9002](http://localhost:9002)
128128

129129
```
130-
Token Url: http://localhost:9001/api/v1/users/login-by-username
130+
Token Url: http://localhost:9002/api/v1/users/login-by-username
131131
Username: admin
132132
Password: 12345678
133133
```

src/Dockerfile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
FROM golang:1.19-buster AS builder
1+
FROM golang:1.22-bookworm AS builder
22

33
WORKDIR /app
44

55
COPY go.* ./
6+
ENV CGO_ENABLED=0
7+
RUN go env -w GO111MODULE=on
8+
RUN go env -w GOPROXY=https://goproxy.cn,direct
69
RUN go mod download
710

811
COPY . ./
@@ -17,8 +20,7 @@ COPY --from=builder /app/server /app/server
1720
COPY --from=builder /app/config/config-docker.yml /app/config/config-docker.yml
1821
COPY --from=builder /app/docs /app/docs
1922

20-
ENV APP_ENV docker
21-
ENV PORT ${Port}
23+
ENV APP_ENV=docker
24+
ENV PORT=${Port}
2225

2326
CMD [ "/app/server" ]
24-

0 commit comments

Comments
 (0)