diff --git a/.github/workflows/deploy-golang-develop.yml b/.github/workflows/deploy-golang-develop.yml index 8f0bc04f..a74370c3 100644 --- a/.github/workflows/deploy-golang-develop.yml +++ b/.github/workflows/deploy-golang-develop.yml @@ -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 diff --git a/occupi-backend/cmd/occupi-backend/main.go b/occupi-backend/cmd/occupi-backend/main.go index 3b4a854e..7b5d0242 100644 --- a/occupi-backend/cmd/occupi-backend/main.go +++ b/occupi-backend/cmd/occupi-backend/main.go @@ -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) diff --git a/occupi-backend/docker-compose.dev.yml b/occupi-backend/docker-compose.dev.yml index 6059bb56..5a04ea10 100644 --- a/occupi-backend/docker-compose.dev.yml +++ b/occupi-backend/docker-compose.dev.yml @@ -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: diff --git a/occupi-backend/docker-compose.prod.yml b/occupi-backend/docker-compose.prod.yml index b6ac1539..092adb33 100644 --- a/occupi-backend/docker-compose.prod.yml +++ b/occupi-backend/docker-compose.prod.yml @@ -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: