The repo for a sample nodejs / mysql / react app can be found here:
setup:commands:- cp seed.sql /docker-entrypoint-initdb.d/services:frontend:runtime: reactjsport: 3000path: frontendbuild:- yarn install- yarn buildserve:- npx serve build/ -l 3000backend:runtime: nodeport: 5000path: backendbuild:- npm installserve:- node app.jsmysql:image: mysqlport: 3306do-not-expose: true
reploy.yml file for this environment can also be found here:
In the above file, we have three services, each of which describe a "process" or "container". A little bit about each service:
frontend service is a react app, built with the create-react-app template. It uses our curated
reactjs runtime and uses the typical build commands packaged with
backend service is a nodejs application, which uses our
nodejs runtime and uses npm for building the app.
mysql service uses the public
mysql image and reads in the
seed.sql file provided during the
setup routine so that the other services have access to staging data.