Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dills122/dockerize-nodejs-addressbook
Example App leveraging Nginx for reverse proxy with TLS
https://github.com/dills122/dockerize-nodejs-addressbook
docker docker-compose expressjs nginx postgres tls typescript
Last synced: 5 days ago
JSON representation
Example App leveraging Nginx for reverse proxy with TLS
- Host: GitHub
- URL: https://github.com/dills122/dockerize-nodejs-addressbook
- Owner: dills122
- Created: 2021-08-03T22:00:39.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-09-08T01:04:56.000Z (over 3 years ago)
- Last Synced: 2023-03-02T19:56:56.010Z (almost 2 years ago)
- Topics: docker, docker-compose, expressjs, nginx, postgres, tls, typescript
- Language: TypeScript
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Dockerize Node.js Address Book
## Getting Started
Install all dependencies
```bash
npm i
```Build and run the containers `docker compose up -d`
To setup the db you'll need to get into the container to run a script
To get inside the container `docker compose exec [containerId] sh`
Then run `node ./bin/migrate.js`
To stop the running container without destroying it `docker compose stop`
To stop the running container and destroy them `docker compose down`
It will be available at the un-proxyed site `localhost:3000` and `http://localhost:3000/persons/all`
and your new custom URL `https://myapp.local`
## SSL Setup
### Windows
You'll need to install some packages using `Chocolatey`, you can download it from [here](https://chocolatey.org/install)
Once you have verified `Chocolatey` is installed, you'll need to execute a few scripts.
You'll need to run these scripts as an administrator, this script will open a new `powershell` as an administrator in the current directory
```powershell
Start-Process powershell -Verb runas -ArgumentList "-NoExit -c cd '$pwd'"
```Execute `configure-hosts-windows.ps1` to configure your custom domain name in host.
If you get an error related to Execution Policies you can learn more [here](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.1)
Execute `setup-windows.ps1` to finish setting up the apps and generate the certs you need