Skip to content

Commit

Permalink
Merge pull request #111 from tableflowhq/feature/dockergitaction
Browse files Browse the repository at this point in the history
added workflow file with matrix strategy
  • Loading branch information
YoBulkMaster committed Sep 20, 2023
2 parents 9f769e9 + 21dd60c commit b53ac57
Show file tree
Hide file tree
Showing 2 changed files with 103 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/tagged-release.yml
@@ -0,0 +1,48 @@
name: ci

on:
push:
tags:
- "*"

jobs:
docker:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- image: tableflow/admin-server
dockerfile: admin-server/Dockerfile
subdir: admin-server
- image: tableflow/admin-ui
dockerfile: admin-ui/Dockerfile
subdir: admin-ui
- image: tableflow/importer-ui
dockerfile: importer-ui/Dockerfile
subdir: importer-ui
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: ${{matrix.image}}
# generate Docker tags based on the following events/attributes
tags: |
type=semver,pattern={{version}}
# type=semver,pattern={{major}}.{{minor}}
# type=semver,pattern={{major}}
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USER_NAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: ${{matrix.subdir}}
file: ${{ matrix.dockerfile }}
push: true
tags: ${{ steps.meta.outputs.tags }}
55 changes: 55 additions & 0 deletions docker-compose-image.yml
@@ -0,0 +1,55 @@
version: "1"

services:
postgres:
extends:
file: docker-compose.base.yml
service: postgres

scylla:
extends:
file: docker-compose.base.yml
service: scylla

backend:
image: tableflow/admin-server
depends_on:
postgres:
condition: service_healthy
scylla:
condition: service_healthy

admin-ui:
depends_on:
backend:
condition: service_healthy
image: tableflow/admin-ui
platform: linux/amd64
# Un-comment if using Apple silicon
#platform: linux/arm64
container_name: admin-ui
ports:
- "3000:80"
networks:
- app_network

importer-ui:
depends_on:
backend:
condition: service_healthy
image: tableflow/importer-ui
platform: linux/amd64
# Un-comment if using Apple silicon
#platform: linux/arm64
container_name: importer-ui
ports:
- "3001:80"
networks:
- app_network

networks:
app_network:
driver: bridge

volumes:
tmp:

0 comments on commit b53ac57

Please sign in to comment.