Skip to content

update database setup and create trpc based api #99

update database setup and create trpc based api

update database setup and create trpc based api #99

Workflow file for this run

name: Dockerfile CI
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
services:
redis:
image: redis
ports:
- "0.0.0.0:6379:6379"
postgres:
image: postgres:14
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- "0.0.0.0:5432:5432"
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 20
# - name: "Run docker backend build"
# run:
# docker build --build-arg APP=backend --build-arg START_COMMAND=start -t celluloid-backend:latest .
# - name: "Run docker frontend build"
# run: docker build --build-arg APP=frontend --build-arg START_COMMAND=start -t celluloid-frontend:latest .
- name: "Run docker frontend build"
run: docker build --build-arg APP=frontend --build-arg START_COMMAND=start -t celluloid-frontend:latest .
- name: "Start docker server"
run: docker run --rm -d --init -p 3000:3000 -e PORT=3000 celluloid-frontend:latest
- name: "Test docker"
run: |
cd .github/workflows/ &&
npm install node-fetch abort-controller &&
node test-docker.js
- name: "Tear down docker"
run: docker kill celluloid-frontend