Compare commits
2 Commits
master
...
sohail/doc
Author | SHA1 | Date | |
---|---|---|---|
95f6a735a0 | |||
0bb44fc80b |
@ -10,4 +10,4 @@
|
|||||||
!/LICENSE
|
!/LICENSE
|
||||||
!/README.md
|
!/README.md
|
||||||
!/go.*
|
!/go.*
|
||||||
!/.env.example
|
!/.env
|
4
.github/workflows/docker.yaml
vendored
4
.github/workflows/docker.yaml
vendored
@ -45,7 +45,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
context: ./
|
context: ./
|
||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
platforms: linux/amd64
|
platforms:
|
||||||
|
- linux/amd64
|
||||||
|
- linux/arm64
|
||||||
push: true
|
push: true
|
||||||
build-args: |
|
build-args: |
|
||||||
BUILD=${{ env.RELEASE_SHORT_COMMIT }}
|
BUILD=${{ env.RELEASE_SHORT_COMMIT }}
|
||||||
|
@ -18,7 +18,7 @@ RUN make VISE_PATH=/build/go-vise -B
|
|||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
RUN echo "Building on $BUILDPLATFORM, building for $TARGETPLATFORM"
|
RUN echo "Building on $BUILDPLATFORM, building for $TARGETPLATFORM"
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
RUN go build -tags logtrace -o ussd-africastalking -ldflags="-X main.build=${BUILD} -s -w" cmd/africastalking/main.go
|
RUN go build -o ussd-africastalking -ldflags="-X main.build=${BUILD} -s -w" cmd/africastalking/main.go
|
||||||
|
|
||||||
FROM debian:bookworm-slim
|
FROM debian:bookworm-slim
|
||||||
|
|
||||||
@ -33,8 +33,7 @@ COPY --from=build /build/ussd-africastalking .
|
|||||||
COPY --from=build /build/LICENSE .
|
COPY --from=build /build/LICENSE .
|
||||||
COPY --from=build /build/README.md .
|
COPY --from=build /build/README.md .
|
||||||
COPY --from=build /build/services ./services
|
COPY --from=build /build/services ./services
|
||||||
COPY --from=build /build/.env.example .
|
COPY --from=build /build/.env .
|
||||||
RUN mv .env.example .env
|
|
||||||
|
|
||||||
EXPOSE 7123
|
EXPOSE 7123
|
||||||
|
|
||||||
|
@ -41,13 +41,10 @@ func buildConnStr() string {
|
|||||||
dbName := initializers.GetEnv("DB_NAME", "")
|
dbName := initializers.GetEnv("DB_NAME", "")
|
||||||
port := initializers.GetEnv("DB_PORT", "5432")
|
port := initializers.GetEnv("DB_PORT", "5432")
|
||||||
|
|
||||||
connString := fmt.Sprintf(
|
return fmt.Sprintf(
|
||||||
"postgres://%s:%s@%s:%s/%s",
|
"postgres://%s:%s@%s:%s/%s",
|
||||||
user, password, host, port, dbName,
|
user, password, host, port, dbName,
|
||||||
)
|
)
|
||||||
logg.Debugf("pg conn string", "conn", connString)
|
|
||||||
|
|
||||||
return connString
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewMenuStorageService(dbDir string, resourceDir string) *MenuStorageService {
|
func NewMenuStorageService(dbDir string, resourceDir string) *MenuStorageService {
|
||||||
|
Loading…
Reference in New Issue
Block a user