Skip to content

Commit

Permalink
Merge pull request #141 from leojonathanoh/docs/docker-add-comma-deli…
Browse files Browse the repository at this point in the history
…mited-examples-for-env-vars-which-expect-array-value

Docs (docker): Add comma-delimited examples for env vars which expect array value
  • Loading branch information
leojonathanoh authored Nov 29, 2023
2 parents c17b68a + 9c26078 commit 106b166
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
5 changes: 4 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,15 @@ services:
- "traefik.http.routers.${COMPOSE_PROJECT_NAME?err}-asp-gamespy-http.rule=Host(`bf2web.gamespy.com`)" # Note: `bf2web.gamespy.com` doesn't need https. The BF2 client BFHQ makes a HTTP requests to `bf2web.gamespy.com` with `Host: bf2web.gamespy.com`.
environment:
# - XDEBUG_MODE=off # Uncomment to disable xdebug
# See ./src/ASP/system/config/config.php for all supported env vars
# See ./src/ASP/system/config/config.php for all supported env vars. Use comma-delimited value for array
- DB_HOST=db
- DB_PORT=3306
- DB_NAME=bf2stats
- DB_USER=admin
- DB_PASS=admin
- ADMIN_HOSTS=127.0.0.1,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 # Limit admins to private IPs
- GAME_HOSTS=127.0.0.1,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 # Limit gameservers to private IPs
- DEBUG_LVL=2
volumes:
- ./src/ASP:/src/ASP
- backups-volume:/src/ASP/system/database/backups # This volume is effectively unused since ASP doesn't allow DB backups for a remote DB, but mount it anyway to avoid errors.
Expand Down
5 changes: 4 additions & 1 deletion docs/bf2hub-bf2stats-example/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,15 @@ services:
- "traefik.http.routers.${COMPOSE_PROJECT_NAME?err}-asp.rule=Host(`asp.example.com`)"
- "traefik.http.services.${COMPOSE_PROJECT_NAME?err}-asp.loadbalancer.server.port=80"
environment:
# See ./src/ASP/system/config/config.php for all supported env vars
# See ./src/ASP/system/config/config.php for all supported env vars. Use comma-delimited value for array
- DB_HOST=db
- DB_PORT=3306
- DB_NAME=bf2stats
- DB_USER=admin
- DB_PASS=admin
- ADMIN_HOSTS=127.0.0.1,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 # Limit admins to private IPs
- GAME_HOSTS=127.0.0.1,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 # Limit gameservers to private IPs
- DEBUG_LVL=2
volumes:
- backups-volume:/src/ASP/system/database/backups # This volume is effectively unused since ASP doesn't allow DB backups for a remote DB, but mount it anyway to avoid errors.
- config-volume:/src/ASP/system/config # For a stateful config file
Expand Down
5 changes: 4 additions & 1 deletion docs/full-bf2-stack-example/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,15 @@ services:
- "traefik.http.routers.${COMPOSE_PROJECT_NAME?err}-asp.rule=Host(`asp.example.com`)"
- "traefik.http.services.${COMPOSE_PROJECT_NAME?err}-asp.loadbalancer.server.port=80"
environment:
# See ./src/ASP/system/config/config.php for all supported env vars
# See ./src/ASP/system/config/config.php for all supported env vars. Use comma-delimited value for array
- DB_HOST=db
- DB_PORT=3306
- DB_NAME=bf2stats
- DB_USER=admin
- DB_PASS=admin
- ADMIN_HOSTS=127.0.0.1,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 # Limit admins to private IPs
- GAME_HOSTS=127.0.0.1,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 # Limit gameservers to private IPs
- DEBUG_LVL=2
volumes:
- backups-volume:/src/ASP/system/database/backups # This volume is effectively unused since ASP doesn't allow DB backups for a remote DB, but mount it anyway to avoid errors.
- config-volume:/src/ASP/system/config # For a stateful config file
Expand Down
7 changes: 5 additions & 2 deletions docs/upgrading-docker-images-to-2.6.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Benefits:

These steps are demonstrated using Docker Compose.

1. Merge the networks and volumes of `asp-nginx` and `asp-php` into a single `asp` container, switch to a volume and env vars for `asp` configuration, and remove `depends_on`.
1. Merge the networks and volumes of `asp-nginx` and `asp-php` into a single `asp` container, switch to env vars and a volume for `asp` configuration, and remove `depends_on`.

For instance, from this:

Expand Down Expand Up @@ -53,12 +53,15 @@ To this:
asp:
image: startersclan/bf2stats:2.6.0-asp
environment:
# See ./src/ASP/system/config/config.php for all supported env vars
# See ./src/ASP/system/config/config.php for all supported env vars. Use comma-delimited value for array
- DB_HOST=db
- DB_PORT=3306
- DB_NAME=bf2stats
- DB_USER=admin
- DB_PASS=admin
- ADMIN_HOSTS=127.0.0.1,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 # Limit admins to private IPs
- GAME_HOSTS=127.0.0.1,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 # Limit gameservers to private IPs
- DEBUG_LVL=2
volumes:
- backups-volume:/src/ASP/system/database/backups # This volume is effectively unused since ASP doesn't allow DB backups for a remote DB, but mount it anyway to avoid errors.
- config-volume:/src/ASP/system/config # For a stateful config file
Expand Down

0 comments on commit 106b166

Please sign in to comment.