Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/uffizzi-previews.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
on:
push:
branches:
- main
- master
- qa
pull_request:
types: [opened,reopened,synchronize,closed]

jobs:
render-compose-file:
name: Render Docker Compose File
runs-on: ubuntu-latest
outputs:
compose-file-cache-key: ${{ steps.hash.outputs.hash }}
compose-file-cache-path: docker-compose.yml
steps:
- name: Checkout git repo
uses: actions/checkout@v3
- name: Hash Rendered Compose File
id: hash
run: echo "::set-output name=hash::$(md5sum docker-compose.yml | awk '{ print $1 }')"
- name: Cache Rendered Compose File
uses: actions/cache@v3
with:
path: docker-compose.yml
key: ${{ steps.hash.outputs.hash }}

deploy-uffizzi-preview:
name: Use Remote Workflow to Preview on Uffizzi
needs:
- render-compose-file
uses: UffizziCloud/preview-action/.github/workflows/reusable.yaml@v2_test_volumes
if: ${{ github.event_name == 'pull_request' && github.event.action != 'closed' }}
with:
compose-file-cache-key: ${{ needs.render-compose-file.outputs.compose-file-cache-key }}
compose-file-cache-path: docker-compose.yml
server: https://pr-653-deployment-9484-uffizzi-platform.app.uffizzi.com/
permissions:
contents: read
pull-requests: write
id-token: write
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM node:latest

RUN apt update && apt install -y git vim curl stress-ng

ARG RAILS_ROOT=/app
RUN mkdir -p $RAILS_ROOT
WORKDIR $RAILS_ROOT
Expand Down
11 changes: 9 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,18 @@ version: '3'

services:
app:
build: .
image: node
entrypoint: /bin/bash
command:
- "-c"
- "ENDPOINT=$$UFFIZZI_URL node /app/app/app.js"
- "tail /dev/zero"

redis:
image: redis:latest
entrypoint: /bin/sh
command:
- "-c"
- "tail /dev/zero"

x-uffizzi:
ingress:
Expand Down