-
-
Save ypereirareis/4ae63ee240fd4aa65d8ef31b6191514f to your computer and use it in GitHub Desktop.
split env solution 2
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
REGISTRY_PATH=registry.domain.tld | |
TAG_PHP=7.2 | |
TAG_NGINX=1.17.5 | |
HTTP_PORT=2000 | |
REPLICA_COUNT_PHP=3 | |
REPLICA_COUNT_NGINX=3 | |
DATABASE_NETWORK=mysql-005 | |
NGINX_MEM_LIMIT=215M | |
PHP_MEM_LIMIT=2G |
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
HOSTNAME=domain.tld |
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
MEMORY_LIMIT=2G | |
DB_HOST=127.0.0.1 | |
DB_PORT=3306 | |
DB_NAME=test | |
DB_USER=root | |
DB_PASSWORD=very_sensitive_password |
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.5' | |
services: | |
# Php service configuration | |
php: | |
image: ${REGISTRY_PATH}/php:${TAG_PHP} | |
env_file: .php.env | |
networks: | |
- default | |
- database | |
deploy: | |
replicas: ${REPLICA_COUNT_PHP:-1} | |
resources: | |
limits: | |
memory: "${PHP_MEM_LIMIT:-1G}" | |
# Nginx service configuration | |
nginx: | |
image: ${REGISTRY_PATH}/nginx:${TAG_NGINX} | |
env_file: .nginx.env | |
networks: | |
- default | |
ports: | |
- ${HTTP_PORT}:80 | |
deploy: | |
replicas: ${REPLICA_COUNT_NGINX:-1} | |
resources: | |
limits: | |
memory: "${NGINX_MEM_LIMIT:-1G}" | |
networks: | |
default: | |
# The database network is external because used by many docker stacks | |
database: | |
external: true | |
name: "${DATABASE_NETWORK}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment