Node Base Image that is configured with different image tags for local and production. This image is opinionated, but not restrictive.
- Maintained by Nullstone
- Where to get help Nullstone Slack
This repository builds 3 variants of images: a local image, a production container image, and a production serverless image.
The local image variant is used to run node in an isolated development environment on your local machine.
CMD
is set tonode app.js
to run a development server.PORT
is set to9000
to align with Nullstone conventions to quickly attach nginx sidecar (example coming soon)ENTRYPOINT
is set to a custom entrypoint script that does the following:- Run
yarn install
- Allows developer to rundocker compose restart app
to make changes to dependencies - If
POSTGRES_URL
is specified, setDB_ADAPTER=postgresql
,DATABASE_URL=$POSTGRES_URL
- If
MYSQL_URL
is specified, setDB_ADAPTER=mysql
,DATABASE_URL=$MYSQL_URL
- Run
The production image variant uses node to run a node app in production mode.
PORT
is set to80
ENTRYPOINT
is set to a custom entrypoint script that does the following:- If
POSTGRES_URL
is specified, setDB_ADAPTER=postgresql
,DATABASE_URL=$POSTGRES_URL
- If
MYSQL_URL
is specified, setDB_ADAPTER=mysql
,DATABASE_URL=$MYSQL_URL
- If