Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nareshbhatia/docker-demo
Example of running a simple static website using docker
https://github.com/nareshbhatia/docker-demo
Last synced: about 6 hours ago
JSON representation
Example of running a simple static website using docker
- Host: GitHub
- URL: https://github.com/nareshbhatia/docker-demo
- Owner: nareshbhatia
- Created: 2024-04-11T18:31:58.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-04-21T18:27:13.000Z (7 months ago)
- Last Synced: 2024-04-22T15:55:00.127Z (7 months ago)
- Language: CSS
- Size: 59.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Docker Demo
Example of running a simple static website using docker.
![Screenshot](assets/screenshot.png)
## Getting Started
Make sure [Docker Desktop](https://www.docker.com/products/docker-desktop/) is
installed and running.### Development Build
```shell
npm ci
npm run dev
```Open a browser window at http://localhost:3000/ to see the site. Every time you
change the code, you will have to refresh the browser. The underlying server
does not have live reloading functionality.### Running without docker
```shell
npm start
```Open a browser window at http://localhost:3000/ to see the site.
### Running with Docker
First build a docker image (see `Dockerfile` to understand how the image is
built):```shell
npm run docker-build
```Now run the docker image:
```shell
npm run docker-run
```Open a browser window at http://localhost:3000/ to see the site.
Use Docker Desktop to stop and delete the `docker-demo` container and the
associated image.### Running with Docker Compose
```shell
docker compose up
```Open a browser window at http://localhost:3000/ to see the site.
Hit control-c to stop docker compose and the `docker-demo` container.
Use Docker Desktop to delete the `docker-demo` container and the associated
image.