Template for a dockerized fullstack web application. The template creates 3 docker services, a Node.js server, a database (MySQL or MongoDB), and a database admin tool.
- server: Node.js
- db: MySQL or MongoDB
- admin: Adminer or Mongo-Express
- Typescript
- Node.js
- Express
- Typescript
- Webpack
- React
- Lit Web Components
- Edit
docker-compose.yml
to enable desired services - Copy
.template.env
to.env
and edit configuration - Edit
client/webpack.config.js
to configure the client (browser) components - run
pnpm run up
to create and start the docker services
pnpm run up [-- <component>]
builds/starts the service containers in development mode, either compiles and watchesall
components, or the component with the given name. If no name is given, a component nameddefault
is assumed.pnpm run down
stops and removes all containerspnpm run restart
stops, removes and then starts the containers againpnpm run bash
runs a bash shell on the server containerpnpm run node
runs a fresh node.js container with the current host folder mapped to/app
and port9000
exposed
pnpm run server
compiles and runs the server codepnpm run dev
compiles, runs, and watches the server code, and compiles, runs, and watches the client code (all components)pnpm run dev:component
compiles, runs, and watches the server code, and compiles, runs, and watches the client code (all components)pnpm run build
builds the server and client code in production modepnpm run build:server
builds the server codepnpm run build:client
builds the client codepnpm run build:client:prod
builds the client code in production modepnpm run build:client:dev
builds the client code in development modepnpm run clean
cleans the output foldersservices/server/bin
andservices/server/public/built