-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First iteration of bare bones example application
Co-authored-by: Torbjørn Hallenberg <[email protected]>
- Loading branch information
0 parents
commit 5b2894a
Showing
4 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM busybox:latest | ||
ENV PORT=8080 | ||
|
||
ADD ./www/index.html /www/index.html | ||
ADD ./www/hello-nais.png /www/hello-nais.png | ||
|
||
HEALTHCHECK CMD nc -z localhost $PORT | ||
|
||
# Create a basic webserver and run it until the container is stopped | ||
CMD echo "httpd started" && trap "exit 0;" TERM INT; httpd -v -p $PORT -h /www -f & wait |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Hello NAIS | ||
|
||
This is a bare bone repository containing a simple web server. | ||
The repository is used by the hello nais tutorial in the nais documentation. | ||
|
||
## Local Development | ||
|
||
### Prerequisites | ||
|
||
- [ ] Docker CLI - via one of these alternatives: | ||
- [Colima](https://github.com/abiosoft/colima) - Colima command-line tool (recommended) | ||
- [Rancher](https://rancherdesktop.io) - Rancher desktop | ||
- [Podman](https://podman-desktop.io) - Podman desktop | ||
- [Docker desktop](https://www.docker.com/products/docker-desktop/) - Docker desktop (requires license) | ||
|
||
### Build | ||
|
||
1. Build Docker image: | ||
|
||
```shell | ||
docker build . -t hello-nais | ||
``` | ||
|
||
2. Run Docker image: | ||
|
||
```shell | ||
docker run -p 8080:8080 hello-nais | ||
``` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<style> | ||
body { | ||
background-color: rgb(125, 159, 169); | ||
} | ||
.center { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100vh; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="center"> | ||
<img src="hello-nais.png" alt="Hello Nais"> | ||
</div> | ||
</body> | ||
</html> |