-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3ac626f
commit 431634f
Showing
6 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: adminer | ||
repository: ddev/ddev-adminer | ||
version: v0.3.4 | ||
install_date: "2024-08-13T10:48:46+03:00" | ||
project_files: | ||
- docker-compose.adminer.yaml | ||
- docker-compose.adminer_norouter.yaml | ||
- adminer | ||
- commands/host/adminer | ||
global_files: [] | ||
removal_actions: [] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#ddev-generated | ||
FROM adminer:standalone | ||
ADD ddev-login.php /var/www/html/plugins-enabled/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
// #ddev-generated | ||
class DDEVLogin { | ||
function loginForm() { | ||
?> | ||
<script type="text/javascript" <?php echo nonce(); ?>> | ||
addEventListener('load', function () { | ||
// Prevent infinite reload loop when auto login failed. | ||
if (document.querySelector('.error')) { | ||
return | ||
} | ||
let dbimage = '<?php echo $_ENV["DDEV_DBIMAGE"] ?>' | ||
// Default driver is mysql ("server"). We don't want to set it if that's the case.dbimage | ||
// The only other currently supported driver is pgsql | ||
if (!dbimage.includes('mariadb') && !dbimage.includes('mysql')) { | ||
document.querySelector('[name="auth[driver]"]').value = "pgsql" | ||
} | ||
document.querySelector('[name="auth[db]"]').value = '<?php echo $_ENV['DDEV_DB_NAME']; ?>' | ||
document.querySelector('[name="auth[username]"]').value = '<?php echo $_ENV['DDEV_DB_USER']; ?>' | ||
document.querySelector('[name="auth[password]"]').value = '<?php echo $_ENV['DDEV_DB_PASS']; ?>' | ||
document.querySelector('[name="auth[permanent]"]:not(:checked)')?.click() | ||
document.querySelector('[type=submit][value=Login]').click() | ||
}); | ||
</script> | ||
<?php | ||
} | ||
} | ||
return new DDEVLogin(); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
## #ddev-generated: If you want to edit and own this file, remove this line. | ||
## Description: Launch a browser with Adminer | ||
## Usage: adminer | ||
## Example: "ddev adminer" | ||
|
||
DDEV_ADMINER_PORT=9100 | ||
DDEV_ADMINER_HTTPS_PORT=9101 | ||
|
||
if [ ${DDEV_PRIMARY_URL%://*} = "http" ] || [ -n "${GITPOD_WORKSPACE_ID:-}" ] || [ "${CODESPACES:-}" = "true" ]; then | ||
ddev launch :$DDEV_ADMINER_PORT | ||
else | ||
ddev launch :$DDEV_ADMINER_HTTPS_PORT | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#ddev-generated | ||
services: | ||
adminer: | ||
container_name: ddev-${DDEV_SITENAME}-adminer | ||
build: | ||
context: './adminer' | ||
environment: | ||
# Use the line below to change the adminer theme. | ||
# - ADMINER_DESIGN=nette | ||
- ADMINER_DEFAULT_SERVER=db | ||
- ADMINER_PLUGINS=tables-filter | ||
- VIRTUAL_HOST=$DDEV_HOSTNAME | ||
- HTTP_EXPOSE=9100:8080 | ||
- HTTPS_EXPOSE=9101:8080 | ||
- DDEV_DBIMAGE | ||
- DDEV_DB_NAME=db | ||
- DDEV_DB_USER=db | ||
- DDEV_DB_PASS=db | ||
labels: | ||
com.ddev.site-name: ${DDEV_SITENAME} | ||
com.ddev.approot: $DDEV_APPROOT | ||
volumes: | ||
- ".:/mnt/ddev_config" | ||
- "ddev-global-cache:/mnt/ddev-global-cache" | ||
depends_on: | ||
- db | ||
|
||
web: | ||
links: | ||
- adminer:adminer |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#ddev-generated | ||
# If omit_containers[ddev-router] then this file will be replaced | ||
# with another with a `ports` statement to directly expose port 8080 to 9100 | ||
services: {} |