Skip to content

Commit

Permalink
build: also build frontend image
Browse files Browse the repository at this point in the history
not only services image
  • Loading branch information
alexgarel committed Jun 5, 2024
1 parent 4bbada5 commit dce59f7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/container-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,19 @@ jobs:
matrix:
image_name:
- search_service_image
- search_front_image

steps:
- name: variables for service
if: matrix.env == 'search_service_image'
run: |
echo "DOCKER_CONTEXT=." >> $GITHUB_ENV
- name: variables for front
if: matrix.env == 'search_front_image'
run: |
echo "DOCKER_CONTEXT=frontend" >> $GITHUB_ENV
- uses: actions/checkout@v4
with:
fetch-depth: 1
Expand Down Expand Up @@ -48,7 +60,7 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
context: ${{ env.DOCKER_CONTEXT }}
# Use runtime target, so that dev dependencies are not included
target: runtime
push: true
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ services:
# frontend is nginx serving static files and proxying to API
search_frontend:
# this is the nginx frontend serving react static version or redirecting queries
image: search-a-licious/searchalicious_frontend:dev
image: ghcr.io/openfoodfacts/search-a-licious/search_front_image:${TAG:-dev}
depends_on:
- api
environment:
Expand Down
2 changes: 0 additions & 2 deletions docker/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ services:
updater:
<<: *api-base
search_frontend:
image: search-a-licious/searchalicious_frontend:dev
build:
context: frontend
args:
Expand All @@ -45,7 +44,6 @@ services:
# dynamic mount
- ./frontend/public:/opt/search-a-licious/public


# Node that create the webcomponents
search_nodejs:
image: search-a-licious/search_nodejs:dev
Expand Down

0 comments on commit dce59f7

Please sign in to comment.