Skip to content

update database setup and create trpc based api #110

update database setup and create trpc based api

update database setup and create trpc based api #110

Workflow file for this run

name: Dockerfile CI
on: [pull_request]
jobs:
test-containers:
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@v3
with:
node-version: 20
cache: yarn
# - 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: install package
run: |
cp .env.ci .env
yarn
- name: build frontend
run: yarn build --filter=frontend
- name: "Run frontend"
run: PORT=3000 yarn workspace frontend start &
# - name: "Start docker server"
# run: docker run --rm -d --init -p 3000:3000 -e PORT=3000 celluloid-frontend:latest
# node .github/workflows/test-docker.js
- name: "Test docker"
run: |
wait-port 3000 -t 3000
- name: "Tear down docker"
run: docker kill celluloid-frontend