https://github.com/aaronjan/docker-nginx-with-env
Simple nginx image with ENV(environment) variables auto-replace. Using official Nginx docker image.
https://github.com/aaronjan/docker-nginx-with-env
Last synced: about 1 month ago
JSON representation
Simple nginx image with ENV(environment) variables auto-replace. Using official Nginx docker image.
- Host: GitHub
- URL: https://github.com/aaronjan/docker-nginx-with-env
- Owner: AaronJan
- License: apache-2.0
- Created: 2014-12-11T08:10:01.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-12-13T15:07:00.000Z (over 11 years ago)
- Last Synced: 2025-03-23T18:51:58.048Z (about 1 year ago)
- Language: Shell
- Size: 145 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
docker-nginx-with-env
=====================
Simple nginx image with ENV(environment) variables auto-replace. Using official Nginx docker image.
## Intro
This image is now in a very early stage, it can only replace php-fpm environment variables.
But, it's usable if you follow the rules.
## Todo
1.Make this can replace every configure file in the `conf.d` folder
2.Support other ENV configures(?? other then PHP? Don't know what's that yet)
3.Still thinking...
##How to use
1.Pull this image:[from Docker](https://registry.hub.docker.com/u/aaronjan/nginx-with-env/)
2.Make your own nginx configure folder, looks like this:
```
conf.d/
vhost.conf # This is very important, this image can only replace placeholders in this file
fastcgi_params
koi-utf
koi-win
mime.types
nginx.conf # This configure file will include the files in the folder `conf.d/`
scgi_params
uwsgi_params
win-utf
```
3.Start php-fpm container
4.Start this image link with php-fpm container:
```bash
docker run -d -p 80:80 --link [your php-fpm container]:phpfpm --volumes-from web_server_php-fpm --name nginx -v [your nginx configure folder]:/etc/nginx_readonly:ro -v [your www folder]:/usr/share/nginx/html:ro aaronjan/nginx-with-env:latest
```
5.Boom. You're good to go.