mirror of
https://github.com/jbowdre/phpipam-agent-docker.git
synced 2024-12-27 05:02:19 +00:00
insert sensible defaults for parameters with null values
This commit is contained in:
parent
715c90020a
commit
93b58d9d69
1 changed files with 5 additions and 5 deletions
10
Dockerfile
10
Dockerfile
|
@ -39,13 +39,13 @@ WORKDIR /opt/phpipam-agent
|
|||
RUN cp config.dist.php config.php && \
|
||||
sed -i -e "s/\['key'\] = .*;/\['key'\] = getenv(\"PHPIPAM_AGENT_KEY\");/" \
|
||||
-e "s/\['pingpath'\] = .*;/\['pingpath'\] = \"\/usr\/sbin\/fping\";/" \
|
||||
-e "s/\['reset_autodiscover_addresses'\] = false/\['reset_autodiscover_addresses'\] = getenv(\"PHPIPAM_RESET_AUTODISCOVER\")/" \
|
||||
-e "s/\['remove_inactive_dhcp'\].*= false/\['remove_inactive_dhcp'\] = getenv(\"PHPIPAM_REMOVE_DHCP\")/" \
|
||||
-e "s/\['reset_autodiscover_addresses'\] = false/\['reset_autodiscover_addresses'\] = getenv(\"PHPIPAM_RESET_AUTODISCOVER\") ?: false/" \
|
||||
-e "s/\['remove_inactive_dhcp'\].*= false/\['remove_inactive_dhcp'\] = getenv(\"PHPIPAM_REMOVE_DHCP\") ?: false/" \
|
||||
-e "s/\['db'\]\['host'\] = \"localhost\"/\['db'\]\['host'\] = getenv(\"PHPIPAM_DB_HOST\")/" \
|
||||
-e "s/\['db'\]\['user'\] = \"phpipam\"/\['db'\]\['user'\] = getenv(\"PHPIPAM_DB_USER\")/" \
|
||||
-e "s/\['db'\]\['user'\] = \"phpipam\"/\['db'\]\['user'\] = getenv(\"PHPIPAM_DB_USER\") ?: \"phpipam\"/" \
|
||||
-e "s/\['db'\]\['pass'\] = \"phpipamadmin\"/\['db'\]\['pass'\] = getenv(\"PHPIPAM_DB_PASS\")/" \
|
||||
-e "s/\['db'\]\['name'\] = \"phpipam\"/\['db'\]\['name'\] = getenv(\"PHPIPAM_DB_NAME\")/" \
|
||||
-e "s/\['db'\]\['port'\] = 3306/\['db'\]\['port'\] = getenv(\"PHPIPAM_DB_PORT\")/" \
|
||||
-e "s/\['db'\]\['name'\] = \"phpipam\"/\['db'\]\['name'\] = getenv(\"PHPIPAM_DB_NAME\") ?: \"phpipam\"/" \
|
||||
-e "s/\['db'\]\['port'\] = 3306/\['db'\]\['port'\] = getenv(\"PHPIPAM_DB_PORT\") ?: 3306/" \
|
||||
config.php \
|
||||
\
|
||||
&& chmod +x /entrypoint.sh \
|
||||
|
|
Loading…
Reference in a new issue