https://github.com/gitpod-io/nginx-example
https://github.com/gitpod-io/nginx-example
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/gitpod-io/nginx-example
- Owner: gitpod-io
- Created: 2019-04-26T19:00:37.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-28T18:26:08.000Z (about 7 years ago)
- Last Synced: 2025-03-10T16:43:10.064Z (over 1 year ago)
- Language: Dockerfile
- Size: 3.91 KB
- Stars: 6
- Watchers: 11
- Forks: 20
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Example: Run Nginx Web Server in Gitpod.io
Nginx is included in Gitpod's [workspace-full](https://hub.docker.com/r/gitpod/workspace-full) docker image.
This example shows how to interact with Nginx and how to configure Nginx. Configuration is optionl, since a default configuration is included in workspace-full.
## Try or Contribute
open [https://gitpod.io#https://github.com/gitpod-io/nginx-example](https://gitpod.io#https://github.com/gitpod-io/nginx-example)
## In this Example:
1) optional: custom [nginx.conf](https://github.com/gitpod-io/nginx-example/blob/master/nginx/nginx.conf).
2) optional: set www-root via NGINX_DOCROOT_IN_REPO via [Dockerfile](https://github.com/gitpod-io/nginx-example/blob/master/.gitpod.dockerfile) (you don't want a custom nginx.conf).
3) follow the Nginx logs in the Gitpod Terminal View via multitail (see [.gitpod.yaml](https://github.com/gitpod-io/nginx-example/blob/master/.gitpod.yml)).
## Terminal Commands to try
* `nginx` - start Nginx (it's started automatically on workspace launch)
* `nginx -s stop` - stop Nginx
* `nginx -s reload` - reload Nginx config
* `gp open /etc/nginx/nginx.conf` - Open nginx.conf in Gitpod editor
* `gp open /var/log/nginx/access.log` - Open access.log in Gitpod editor
* `gp open /var/log/nginx/error.log` - Open error.log in Gitpod editor
* `multitail /var/log/nginx/access.log -I /var/log/nginx/error.log` - View and follow logs in Terminal