Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dbp-relay-core-bundle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
digital blueprint
Relay API Gateway
dbp-relay-core-bundle
Commits
c0262c7e
Commit
c0262c7e
authored
Dec 14, 2021
by
Bekerle, Patrizio
Browse files
Options
Downloads
Patches
Plain Diff
Add disable-database-url.php
parent
67c94f89
No related branches found
No related tags found
No related merge requests found
Pipeline
#73411
passed
Dec 14, 2021
Stage: test
Changes
1
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/disable-database-url.php
+17
-0
17 additions, 0 deletions
bin/disable-database-url.php
with
17 additions
and
0 deletions
bin/disable-database-url.php
0 → 100755
+
17
−
0
View file @
c0262c7e
#!/usr/bin/env php
<?php
//########################################################################################################
// Disables the DATABASE_URL env variable in `.env` when its default value is used to prevent confusion.
//########################################################################################################
// read the entire string
$str
=
file_get_contents
(
'.env'
);
$pattern
=
'/^(DATABASE_URL=\"postgresql:\/\/symfony:ChangeMe@127.0.0.1:5432\/app)/im'
;
$replacement
=
'# $1'
;
$str
=
preg_replace
(
$pattern
,
$replacement
,
$str
);
// write the entire string
file_put_contents
(
'.env'
,
$str
);
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment