Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated hotfixes #117

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions .github/workflows/main2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |

docker build -t backend-everyshilling_app-auth:latest -f services/app-auth/Dev.Dockerfile services/app-auth
docker build -t backend-everyshilling_app-db:latest -f services/app-db/Dev.Dockerfile services/app-db
docker build -t backend-everyshilling_app-otp:latest -f services/app-otp/Dockerfile services/app-otp
Expand All @@ -41,24 +40,6 @@ jobs:
docker push ${{ secrets.ECR_ACCOUNT }}/$ECR_REPOSITORY:app-db
docker push ${{ secrets.ECR_ACCOUNT }}/$ECR_REPOSITORY:app-otp

# run: |
# make build-dev

# APP_AUTH_TAG=$(docker images --filter=reference='everyshilling_app-auth:latest' --format "{{.ID}}")
# APP_DB_TAG=$(docker images --filter=reference='everyshilling_app-db:latest' --format "{{.ID}}")
# APP_OTP_TAG=$(docker images --filter=reference='everyshilling_app-otp:latest' --format "{{.ID}}")

# # Tag and push the Docker images
# docker tag everyshilling_app-auth:latest ${{ secrets.ECR_ACCOUNT }}/$ECR_REPOSITORY:app-auth
# docker tag everyshilling_app-db:latest ${{ secrets.ECR_ACCOUNT }}/$ECR_REPOSITORY:app-db
# docker tag everyshilling_app-otp:latest ${{ secrets.ECR_ACCOUNT }}/$ECR_REPOSITORY:app-otp
# docker push ${{ secrets.ECR_ACCOUNT }}/$ECR_REPOSITORY:app-auth
# docker push ${{ secrets.ECR_ACCOUNT }}/$ECR_REPOSITORY:app-db
# docker push ${{ secrets.ECR_ACCOUNT }}/$ECR_REPOSITORY:app-otp






# # everyshilling is the stack name
Expand Down
25 changes: 0 additions & 25 deletions .github/workflows/mockserver.yml

This file was deleted.

49 changes: 41 additions & 8 deletions services/app-auth/Dev.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,56 @@
# # Initial stage: download modules
# FROM golang:1.18-alpine as golang-builder

# RUN apk add build-base openssl
# RUN apk --update add git ca-certificates
# RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64;


# FROM golang-builder AS app-builder
# WORKDIR /app/auth

# # # Copy go mod files
# # COPY go.mod go.sum \
# # /app/auth/

# COPY . /app/auth/

# # RUN go mod download
# # RUN go build -o /tmp/app-auth

# # RUN go mod init

# # Generate private and public keys
# RUN mkdir -p /etc/auth-service

# RUN if [ ! -e "/etc/auth-service/public.pem" ]; then \
# openssl genrsa -out /etc/auth-service/private.pem 2048; \
# openssl rsa -in /etc/auth-service/private.pem -pubout -out /etc/auth-service/public.pem; \
# fi;

# FROM app-builder AS prepare-bin

# COPY --from=app-builder /tmp/app-auth /usr/bin/auth-service

# ENTRYPOINT ["/usr/bin/auth-service"]


# Initial stage: download modules
FROM golang:1.18-alpine as golang-builder

RUN apk add build-base openssl
RUN apk --update add git ca-certificates
RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64;


FROM golang-builder AS app-builder
ENV GO111MODULE=on
WORKDIR /app/auth

# Copy go mod files
COPY go.mod go.sum \
/app/auth/
COPY go.mod go.sum ./

RUN go mod download

COPY . /app/auth


COPY . ./

RUN go build -o /tmp/app-auth

Expand All @@ -33,4 +66,4 @@ FROM app-builder AS prepare-bin

COPY --from=app-builder /tmp/app-auth /usr/bin/auth-service

ENTRYPOINT ["/usr/bin/auth-service"]
ENTRYPOINT ["/usr/bin/auth-service"]