This is an attempt to build a microservices architecture: API driven, lightweight on infrastructure (Alpine Linux), loosely coupled services. See ideas from [1], [2]
- Alpine Linux
- NodeJS
- Nginx
- Dnsmasq
- Docker
-
- For fresh project, create the special network
./scripts/docker-new-network.sh
-
- Build the containers
./scripts/docker-compose-up.sh
-
- Destroy the containers, excluding network and images
./scripts/docker-compose-down.sh
-
- Restart the containers
./scripts/docker-compose-restart.sh
./
docker/
+- all Docker related files
scipts/
+- compose scripts, new network, etc
www-api/
+- API source code
www-public/
+- Landing/static page
The list below requires a massive amount of time but definitely doable.
- Deploy to AWS
- Build infra with Terraform
- Use registry like Consul, etc
- Multi-cloud deployment eg. AWS, Google Cloud, Azure
- Use CI
- Others, file an issue
- www-dangxproject
- Project landing page, mostly static assets
- Info
- URL: http://dangxproject.dev
- Port: 3000, Expose: 80
- www-api
- NodeJS-based API
- Info
- URL: http://api.dangxproject.dev
- Port: 3001, Expose: 80
- Dnsmasq
- Configured to only return queries for any host under "dev" eg: xxx.dev, api.dangxproject.dev on 127.0.0.1 IP address
- command section in docker-compose.dnsmasq.yml and its manpage
- Docker vEthernet on Windows 10
- Attach the following entries below to your Docker vEthernet IPv4 adapter:
- DNS Server: 127.0.0.1
- DNS Suffix: dev
- Attach the following entries below to your Docker vEthernet IPv4 adapter:
- Tested on Windows 10
- Windows 10 Pro Insider Release Build: 16251.rs3_release
- Docker Server Version: 17.06.0-ce
- Kernel Version: 4.9.36-moby
- Dell XPS 13 9343
- [1] IBM, Learning Microservices Architecture with Bluemix and Docker
- [2] Improving dev environments: All the HTTP things
- Docker 2-way linking
- Docker Nginx Proxy: /~https://github.com/jwilder/nginx-proxy
- Docker Dnsmasq
- https://jqnotes.blogspot.co.nz/2012/08/configure-windows-7-to-support-dnsmasq.html
- https://stackoverflow.com/questions/330395/dns-problem-nslookup-works-ping-doesnt
- https://www.windowscentral.com/how-change-your-pcs-dns-settings-windows-10
- https://serverfault.com/questions/391914/is-there-a-way-to-use-a-specific-dns-for-a-specific-domain