I want to configure nginx with docker. My website structure is something like:
root
..controller/phpFile1.php
..controller/phpFile2.php
..controller/phpFileN.php
..public/index.php
..public/css/file.css
.. and so on
I have read various guides that recommend configurations of this type:
version: '3.6'
services:
my-app:
image: nginx
restart: always
volumes:
- "/path/to/public:/usr/share/nginx/html"
environment:
# NGINX-PROXY ENVIRONMENT VARIABLES: UPDATE ME
- VIRTUAL_HOST=your-website-one.com
- VIRTUAL_PORT=80
- LETSENCRYPT_HOST=your-website-one.com
- LETSENCRYPT_EMAIL=your.email@domain.com
# /END NGINX-PROXY ENVIRONMENT VARIABLES
expose:
- 80
networks:
default:
external:
name: nginx-proxy
But.. What I should do is link the site folder inside the docker and specify the path to the public folder. How can I do it ?
Aucun commentaire:
Enregistrer un commentaire