-
-
Save specialtactics/13d99b188cd587a02e8d0ffdf3fa1771 to your computer and use it in GitHub Desktop.
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
## These are from 2 separate files, I just put them into the same place for convenience. | |
# Project 1 | |
NGINX_VIRTUAL_HOST=api.xclaim.local | |
# Project 2 | |
NGINX_VIRTUAL_HOST=api.xpay.local |
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
version: '3.7' | |
services: | |
### NGINX Server ######################################### | |
nginx: | |
container_name: xclaim_nginx | |
build: | |
context: ./env/docker/nginx | |
volumes: | |
- ./:/var/www:cached | |
- ${NGINX_HOST_LOG_PATH}:/var/log/nginx | |
depends_on: | |
- php-fpm | |
- postgres | |
labels: | |
- traefik.xclaim.frontend.rule=Host:${NGINX_VIRTUAL_HOST} | |
- traefik.xclaim.backend=xclaim_nginx | |
- traefik.xclaim.port=80 | |
networks: | |
- xclaim-network | |
- traefik-network | |
### Network Setup ########################################### | |
networks: | |
xclaim-network: | |
name: xclaim-network | |
traefik-network: | |
external: | |
name: traefik-network |
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
version: '3.7' | |
services: | |
### NGINX Server ######################################### | |
nginx: | |
container_name: xpay_nginx | |
build: | |
context: ./env/docker/nginx | |
volumes: | |
- ./:/var/www:cached | |
- ${NGINX_HOST_LOG_PATH}:/var/log/nginx | |
depends_on: | |
- php-fpm | |
- postgres | |
labels: | |
- traefik.xpay.frontend.rule=Host:${NGINX_VIRTUAL_HOST} | |
- traefik.xpay.backend=xpay_nginx | |
- traefik.xpay.port=80 | |
networks: | |
- xpay-network | |
- traefik-network | |
### Network Setup ########################################### | |
networks: | |
xpay-network: | |
name: xpay-network | |
traefik-network: | |
external: | |
name: traefik-network |
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
docker run -d --name traefik -p 80:80 -p 8080:8080 --network=traefik-network -v /var/run/docker.sock:/var/run/docker.sock:ro traefik --api --docker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment