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

feat: Create and push docker images to hub #198

Merged
merged 10 commits into from
Apr 17, 2024
40 changes: 40 additions & 0 deletions .github/workflows/push-to-hub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build and push images to docker hub on merge to dev
run-name: ${{ github.actor }} is building and pushing images to docker hub

on:
push:
branches:
- "dev"

jobs:
Build-Push-Images-To-Docker-Hub:
runs-on: ubuntu-latest

steps:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The matrix strategy is commented out and not used in the workflow. This means that the workflow will not be able to build and push images for multiple services as intended. Please uncomment and properly use the matrix strategy.

- uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: julepai
password: "${{ secrets.DOCKER_HUB_PASSWORD }}"

- uses: KengoTODA/actions-setup-docker-compose@v1
with:
version: "2.24.6"

- name: Build images
run: |
touch .env
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'touch .env' command is used twice in the workflow, once before building the images and once before pushing the images. This is unnecessary as the '.env' file only needs to be created once before building the images. Please remove the redundant 'touch .env' command.

docker compose build

- name: Push images
run: |
docker compose push

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
37 changes: 13 additions & 24 deletions agents-api/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
name: julep-agents-api
version: "3"

include:
# - ../model-serving/docker-compose.yml
# - ../memory-store/docker-compose.yml
# TODO: figure out why this doesn't work
# TODO: figure out why this doesn't work
# include:
# - ../model-serving/docker-compose.yml
# - ../memory-store/docker-compose.yml

services:
agents-api:
env_file:
- path: .env
required: false
- path: ../.env
required: false
image: julepai/agents-api:dev
env_file: "../.env"

container_name: agents-api
depends_on:
Expand Down Expand Up @@ -40,11 +38,8 @@ services:
path: Dockerfile

worker:
env_file:
- path: .env
required: false
- path: ../.env
required: true
image: julepai/worker:dev
env_file: "../.env"

build:
context: .
Expand Down Expand Up @@ -87,12 +82,9 @@ services:
capabilities: [gpu]

temporal:
image: julepai/temporal:dev
container_name: temporal
env_file:
- path: .env
required: false
- path: ../.env
required: true
env_file: "../.env"

build:
context: .
Expand All @@ -108,11 +100,8 @@ services:
path: Dockerfile.temporal

cozo-migrate:
env_file:
- path: .env
required: false
- path: ../.env
required: true
image: julepai/cozo-migrate:dev
env_file: "../.env"

container_name: cozo-migrate
depends_on:
Expand Down
7 changes: 2 additions & 5 deletions gateway/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@ include:

services:
gateway:
env_file:
- path: .env
required: false
- path: ../.env
required: true
image: julepai/gateway:dev
env_file: "../.env"

environment:
- GATEWAY_PORT=80
Expand Down
7 changes: 2 additions & 5 deletions memory-store/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@ version: "3"

services:
memory-store:
env_file:
- path: .env
required: false
- path: ../.env
required: true
image: julepai/memory-store:dev
env_file: "../.env"
environment:
- COZO_AUTH_TOKEN=${COZO_AUTH_TOKEN}
- COZO_PORT=${COZO_PORT}
Expand Down
8 changes: 3 additions & 5 deletions model-serving/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ name: julep-model-serving

services:
model-serving:
env_file:
- path: .env
required: false
- path: ../.env
required: true
image: julepai/model-serving:dev
env_file: "../.env"

environment:
- MODEL_API_KEY=${MODEL_API_KEY}
- MODEL_API_KEY_HEADER_NAME=${MODEL_API_KEY_HEADER_NAME}
Expand Down
Loading