Skip to content

Commit

Permalink
chore: Update Docker image tag and file path in deploy-golang-develop…
Browse files Browse the repository at this point in the history
….yml
  • Loading branch information
waveyboym committed Jun 14, 2024
1 parent 96faf1f commit 5244476
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy-golang-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,6 @@ jobs:
script: |
cd /home/Y2KODELABS/occupi-backend-dev/occupi-backend
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
DOCKER_USERNAME=${{ secrets.DOCKER_USERNAME }} docker compose -f docker-compose.dev.yml down
DOCKER_USERNAME=${{ secrets.DOCKER_USERNAME }} docker compose -f docker-compose.dev.yml pull
DOCKER_USERNAME=${{ secrets.DOCKER_USERNAME }} docker compose -f docker-compose.dev.yml up -d
6 changes: 6 additions & 0 deletions occupi-backend/cmd/occupi-backend/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ func main() {
logrus.Fatal("Cert or Key file not found")
}

// logrus all env variables
logrus.Infof("Server running on port: %s", configs.GetPort())
logrus.Infof("Server running in %s mode", configs.GetGinRunMode())
logrus.Infof("Server running with cert file: %s", certFile)
logrus.Infof("Server running with key file: %s", keyFile)

// Listening on the port with TLS
if err := ginRouter.RunTLS(":"+configs.GetPort(), certFile, keyFile); err != nil {
logrus.Fatal("Failed to run server: ", err)
Expand Down
2 changes: 1 addition & 1 deletion occupi-backend/docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ services:
- "80:80"
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- /etc/nginx:/etc/nginx:ro
- /etc/letsencrypt/live/dev.occupi.tech/fullchain.pem:/etc/letsencrypt/live/dev.occupi.tech/fullchain.pem:ro
- /etc/letsencrypt/live/dev.occupi.tech/privkey.pem:/etc/letsencrypt/live/dev.occupi.tech/privkey.pem:ro
depends_on:
Expand Down
4 changes: 2 additions & 2 deletions occupi-backend/docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ services:
- "80:80"
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- /etc/nginx:/etc/nginx:ro
- /etc/letsencrypt/live/occupi.tech/fullchain.pem:/etc/letsencrypt/live/occupi.tech/fullchain.pem:ro
- /etc/letsencrypt/live/occupi.tech/privkey.pem:/etc/letsencrypt/live/occupi.tech/privkey.pem:ro
depends_on:
- occupi-backend-dev
- occupi-backend-prod

networks:
webnet:
Expand Down

0 comments on commit 5244476

Please sign in to comment.