Skip to content

Commit

Permalink
Change network name from nginx-proxy to proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
kulemantu committed May 8, 2022
1 parent a4d2005 commit ed96bff
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 21 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Configure the `*.env.example` files and rename to `*.env` files

**Note:** Not all `docker-compose.yml` files read from `*.env `files (**TODO**)

## Set up domains pointing to platforms using Nginx-proxy
Create `nginx-proxy` network to containers to be exposed via port `80`/`443`
## Set up domains pointing to platforms using Nginx-Proxy
Create `proxy` network to containers to be exposed via port `80`/`443`
```
docker network create nginx-proxy
docker network create proxy
```

Run `docker-compose up -d` from the `nginx-proxy` folder and ensure that ports `80` and `443` are bindable.
Expand All @@ -22,7 +22,7 @@ docker-compose -f # To see added services and HTTP requests log
Point domains to your instances and generate SSL certificates with LetsEncrypt by
- Setting env `VIRTUAL_HOST` and `LETSENCRYPT_HOST` to "subdomain.example.com" or "example.com"
- Setting env `VIRTUAL_PORT` to the exposed port for your app service in the `docker-compose.yml` files
- Setting env `DEFAULT_EMAIL` in the `nging-proxy/nginx-proxy-letsencrypt` service for your support account
- Setting env `DEFAULT_EMAIL` in the `nginx-proxy/nginx-proxy-letsencrypt` service for your support account

**Credit**
- https://github.com/nginx-proxy/nginx-proxy (MIT)
Expand Down Expand Up @@ -54,8 +54,8 @@ docker-compose run --rm directus install --email [email protected] --password d1
# Contributing
Create a pull request after checking that your setup is ready to go with Docker Compose and nginx-proxy
1. Server services should contain the environment variables `VIRTUAL_HOST`, `VIRTUAL_PORT` and `LETSENCRYPT_HOST`
2. Server services in `docker-compose.yml` should belong to `default` and `nginx-proxy` if they have other services
3. Other services like databases in `docker-compose.yml` shouldn't be on the network `nginx-proxy`
2. Server services in `docker-compose.yml` should belong to `default` and `proxy` if they have other services
3. Other services like databases in `docker-compose.yml` shouldn't be on the network `proxy`
4. Avoid sharing .env files between services; use `postgres.env` or `service.env` where possible

# License
Expand Down
4 changes: 2 additions & 2 deletions botpress/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:
- ./botpress/data:/botpress/data
networks:
- default
- nginx-proxy
- proxy

botpress_lang:
build:
Expand Down Expand Up @@ -45,5 +45,5 @@ volumes:
bp_pgdata:

networks:
nginx-proxy:
proxy:
external: true
4 changes: 2 additions & 2 deletions directus/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3"

networks:
directus:
nginx-proxy:
proxy:
external: true

volumes:
Expand Down Expand Up @@ -57,5 +57,5 @@ services:
- ./data/uploads:/var/directus/public/uploads
networks:
- directus
- nginx-proxy
- proxy
restart: always
4 changes: 2 additions & 2 deletions ghost/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ services:
- ./content:/var/lib/ghost/content
networks:
- default
- nginx-proxy
- proxy
depends_on:
- db

Expand All @@ -42,6 +42,6 @@ services:
MYSQL_ROOT_PASSWORD: ${DB_PASS}

networks:
nginx-proxy:
proxy:
external: true

4 changes: 2 additions & 2 deletions nginx-proxy/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ networks:
name: nginx-proxy

services:
nginx-proxy:
proxy:
image: jwilder/nginx-proxy
container_name: nginx-proxy
restart: always
Expand All @@ -27,7 +27,7 @@ services:
container_name: nginx-proxy-letsecrypt
restart: always
volumes_from:
- nginx-proxy
- proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
Expand Down
4 changes: 2 additions & 2 deletions strapi/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ services:
- db
networks:
- default
- nginx-proxy
- proxy

db:
container_name: strapi_postgres
Expand All @@ -38,7 +38,7 @@ services:
- default

networks:
nginx-proxy:
proxy:
external: true

volumes:
Expand Down
6 changes: 3 additions & 3 deletions traccar/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ services:
- ./conf/traccar.xml:/opt/traccar/conf/traccar.xml
networks:
- default
- nginx-proxy
- proxy

networks:
nginx-proxy:
proxy:
external:
name: nginx-proxy
name: proxy

volumes:
traccar-db:
Expand Down
4 changes: 2 additions & 2 deletions wordpress/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ services:
LETSENCRYPT_HOST: ${HOST_URL}
LETSENCRYPT_EMAIL: ${SUPPORT_EMAIL}
networks:
- nginx-proxy
- proxy
- default
volumes:
db_data: {}
networks:
nginx-proxy:
proxy:
external: true

0 comments on commit ed96bff

Please sign in to comment.