Skip to content

Commit

Permalink
fix: updated docker hub build action to new octane and other minor up…
Browse files Browse the repository at this point in the history
…dates
  • Loading branch information
CS76 committed Dec 11, 2024
1 parent b600bb8 commit 9f633c9
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 113 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@

# This worklflow will perform following actions when the code is pushed to development branch:
# - Build the latest docker image in development.
# - Push the latest docker image to Google Artifact Registry-Dev.
# - Rollout the latest image in GKE.
#
# Maintainers:
# - name: Chandu Nainala
# - email: [email protected]

name : Build and Deploy to Dev

on:
push:
branches: [development]

env:
PROJECT_ID: ${{ secrets.GKE_PROJECT }}
REPOSITORY_NAME: coconut
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
APP_IMAGE: coconut-app
REPOSITORY_NAMESPACE: nfdi4chem

jobs:
setup-build-publish-deploy-dev:
name: Build & deploy to development
runs-on: ubuntu-latest
environment:
name: Dev
steps:
# Checkout code
- name: Checkout
uses: actions/checkout@v4

# Login to Docker
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ env.DOCKER_HUB_USERNAME }}
password: ${{ env.DOCKER_HUB_PASSWORD }}

# Build and push the app Docker image
- name: Build and push App Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./FrankenPHP.Dockerfile
push: true
build-args: |
RELEASE_VERSION=latest
COMPOSER_AUTH=${{ secrets.COMPOSER_AUTH }}
tags: ${{ env.REPOSITORY_NAMESPACE }}/${{ env.REPOSITORY_NAME }}:latest
97 changes: 0 additions & 97 deletions .github/workflows/dev-build.yml

This file was deleted.

1 change: 0 additions & 1 deletion FrankenPHP.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Accepted values: 8.3 - 8.2
ARG PHP_VERSION=8.3

ARG FRANKENPHP_VERSION=latest
Expand Down
32 changes: 17 additions & 15 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ services:
depends_on:
- pgsql
- redis
- cm
worker:
build:
context: .
dockerfile: ./FrankenPHP.Dockerfile
image: coconut-8.3/app
container_name: coconut_app_worker
container_name: coconut_worker
env_file:
- .env
networks:
Expand All @@ -28,6 +29,7 @@ services:
- app
- pgsql
- redis
- cm
environment:
WITH_SCHEDULER: true
WITH_HORIZON: true
Expand Down Expand Up @@ -71,20 +73,20 @@ services:
- ping
retries: 3
timeout: 5s
# cm:
# image: "nfdi4chem/cheminformatics-microservice:dev-latest"
# environment:
# HOMEPAGE_URL: "https://docs.api.naturalproducts.net"
# ports:
# - "81:80"
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost:81/latest/chem/health"]
# interval: 1m30s
# timeout: 10s
# retries: 20
# start_period: 60s
# networks:
# - coconut
cm:
image: "nfdi4chem/cheminformatics-microservice:latest-lite"
environment:
HOMEPAGE_URL: "https://docs.api.naturalproducts.net"
ports:
- '${APP_PORT:-8001}:80'
healthcheck:
test: ["CMD", "curl", "-f", "http://cm:80/latest/chem/health"]
interval: 1m30s
timeout: 10s
retries: 20
start_period: 60s
networks:
- coconut
networks:
coconut:
driver: bridge
Expand Down

0 comments on commit 9f633c9

Please sign in to comment.