/PeTaL-api

Primary LanguageDockerfile

PeTaL (Periodic Table of Life) API

The Periodic Table of Life (PeTaL, pronounced petal) is a design tool aimed at allowing users to seemlesly move from ideas (from nature or other sources) to design.

PeTaL is comprised of multiple interconnected services. This repository is for the API. There are other repositories for the ReactJS web front end client, PostgreSQL database server, and Labeller.

Getting Started

clone this repo

option 1: run locally (easiest)
npm install
npm start
curl -i localhost:8080/v1/functions

option 2: run in docker container
docker build -t petal-api .
docker run --name petal-api -p 8080:8080 -d petal-api --mount type=bind,source="$(pwd)"/server.js,target=/app
curl -i localhost:8080/v1/functions

connect to docker container
docker exec -it petal-api /bin/bash

Used this guide to do initial setup https://nodejs.org/en/docs/guides/nodejs-docker-webapp/

Setting up to run in Google Cloud Run https://cloud.google.com/run/docs/quickstarts/build-and-deploy

https://cloud.google.com/cloud-build/docs/quickstart-build https://cloud.google.com/cloud-build/docs/quickstart-deploy https://cloud.google.com/cloud-build/docs/automating-builds/create-manage-triggers