iris/_examples/routing/basic
Gerasimos (Makis) Maropoulos 6add1ba49b
fix #2158 and more
2023-07-08 02:08:18 +03:00
..
.dockerignore reorganization of _examples and add some new examples such as iris+groupcache+mysql+docker 2020-06-07 15:26:06 +03:00
docker-compose.yml reorganization of _examples and add some new examples such as iris+groupcache+mysql+docker 2020-06-07 15:26:06 +03:00
Dockerfile reorganization of _examples and add some new examples such as iris+groupcache+mysql+docker 2020-06-07 15:26:06 +03:00
main_test.go fix #2158 and more 2023-07-08 02:08:18 +03:00
main.go v12.2.0 2023-03-11 22:37:55 +02:00
README.md reorganization of _examples and add some new examples such as iris+groupcache+mysql+docker 2020-06-07 15:26:06 +03:00

Basic Example

The only requirement for this example is Docker.

Docker Compose

The Docker Compose is pre-installed with Docker for Windows. For linux please follow the steps described at: https://docs.docker.com/compose/install/.

Build and run the application for linux arch and expose it on http://localhost:8080.

$ docker-compose up

See docker-compose file.

Without Docker Compose

  1. Build the image as "myapp" (docker build)
  2. Run the image and map exposed ports (-p 8080:8080)
  3. Attach the interactive mode so CTRL/CMD+C signals are respected to shutdown the Iris Server (-it)
  4. Cleanup the image on finish (--rm)
$ docker build -t myapp . 
$ docker run --rm -it -p 8080:8080 myapp:latest