Skip to content

Commit

Permalink
Remove all the fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
elarsaks committed Jul 30, 2023
1 parent 7e6038b commit 1d28e9f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 27 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/deploy-back-end.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- DEPLOY-back-end

jobs:
deploy:
runs-on: ubuntu-latest
Expand All @@ -30,13 +29,7 @@ jobs:
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}

- name: Get the version
id: get_version
run: echo "::set-output name=VERSION::$(git rev-parse --short HEAD)"

- name: Build and Push Docker images
run: |
docker build -t goblockchain.azurecr.io/wallet-server:${{ steps.get_version.outputs.VERSION }} -f ./cmd/wallet_server/Dockerfile ../..
docker push goblockchain.azurecr.io/wallet-server:${{ steps.get_version.outputs.VERSION }}
docker build -t goblockchain.azurecr.io/miner:${{ steps.get_version.outputs.VERSION }} -f ./cmd/blockchain_server/Dockerfile ../..
docker push goblockchain.azurecr.io/miner:${{ steps.get_version.outputs.VERSION }}
docker-compose build --no-cache wallet-server miner-1
docker-compose push wallet-server miner-1
12 changes: 3 additions & 9 deletions cmd/blockchain_server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
# Start from the golang base image
FROM golang:1.18.0-alpine

# Set the working directory inside the container
WORKDIR /app

# Copy go.mod and go.sum files
COPY go.mod go.sum ./

# Download all dependencies
RUN go mod download

# Copy the entire project
COPY . .
# Copy the entire parent_folder into the container
COPY ../../ .

# Install the "air" tool for live-reloading (if needed)
RUN go install github.com/cosmtrek/air@latest
Expand All @@ -24,3 +17,4 @@ EXPOSE ${BLOCKCHAIN_SERVER_PORT}

# Set the default command to run the application
CMD ["sh", "-c", "${COMMAND}"]

14 changes: 5 additions & 9 deletions cmd/wallet_server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
# Start from the golang base image
FROM golang:1.18.0-alpine

# Set the working directory inside the container
WORKDIR /app

# Copy go.mod and go.sum files
COPY go.mod go.sum ./

# Download all dependencies
RUN go mod download

# Copy the entire project
COPY . .
# Copy the entire grand parent folder into the container
COPY ../.. .

# Install the "air" tool for live-reloading (if needed)
RUN go install github.com/cosmtrek/air@latest
Expand All @@ -22,5 +15,8 @@ WORKDIR /app/cmd/wallet_server
# Set the port number to expose for HTTP (port 8080)
EXPOSE ${PORT}

# Set the port number to expose for HTTPS (port 443)
# EXPOSE 443 Azure App Service automatically handles the redirection of HTTPS traffic from port 443 to port 8080

# Set the default command to run the application
CMD ["sh", "-c", "${COMMAND}"]

0 comments on commit 1d28e9f

Please sign in to comment.