forked from xzilla/phppgadmin
-
Notifications
You must be signed in to change notification settings - Fork 288
Official Docker image #144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ngosang
wants to merge
1
commit into
phppgadmin:master
Choose a base branch
from
ngosang:feature/docker
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,24 @@ | ||
| FROM alpine:3.14.1 | ||
|
|
||
| EXPOSE 80 | ||
| WORKDIR /var/www/app | ||
|
|
||
| RUN apk --no-cache --update add \ | ||
| tzdata ca-certificates curl nginx s6 php7 php7-fpm php7-opcache php7-session php7-mbstring php7-pgsql \ | ||
| && rm -rf /var/www/localhost \ | ||
| && rm -f /etc/php7/php-fpm.d/www.conf | ||
|
|
||
| ENV ARTIFACT_VERSION=REL_7-13-0/phpPgAdmin-7.13.0.tar.gz | ||
| RUN curl -L -o /phpPgAdmin.tar.gz https://github.com/phppgadmin/phppgadmin/releases/download/${ARTIFACT_VERSION} \ | ||
| && tar -xvzf /phpPgAdmin.tar.gz -C / \ | ||
| && rm /phpPgAdmin.tar.gz \ | ||
| && mv /phpPgAdmin-*/* /var/www/app \ | ||
| && chown -R nginx:nginx /var/www/app | ||
|
|
||
| ADD docker/ / | ||
| RUN chmod +x -R /etc/services.d | ||
|
|
||
| ENTRYPOINT ["/bin/s6-svscan", "/etc/services.d"] | ||
| CMD [] | ||
|
|
||
| # docker build -t phppgadmin:custom . | ||
This file contains hidden or 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,12 @@ | ||
| version: '3.8' | ||
| services: | ||
| phppgadmin: | ||
| image: phppgadmin:custom | ||
| container_name: phppgadmin | ||
| ports: | ||
| - "8077:80" | ||
| environment: | ||
| - TZ=Europe/Madrid | ||
| volumes: | ||
| - <host_path>/config.inc.php:/var/www/app/conf/config.inc.php | ||
| restart: unless-stopped |
This file contains hidden or 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,59 @@ | ||
| user nginx; | ||
| worker_processes 1; | ||
| pid /var/run/nginx.pid; | ||
|
|
||
| events { | ||
| worker_connections 1024; | ||
| } | ||
|
|
||
| http { | ||
| include mime.types; | ||
| default_type application/octet-stream; | ||
|
|
||
| sendfile on; | ||
| tcp_nopush on; | ||
| tcp_nodelay on; | ||
| keepalive_timeout 65; | ||
| server_tokens off; | ||
| access_log off; | ||
| error_log /dev/stderr; | ||
|
|
||
| fastcgi_buffers 16 16k; | ||
| fastcgi_buffer_size 32k; | ||
|
|
||
| server { | ||
| listen 80; | ||
| server_name localhost; | ||
| index index.php; | ||
| root /var/www/app; | ||
| client_max_body_size 32M; | ||
|
|
||
| location / { | ||
| try_files $uri $uri/ /index.php$is_args$args; | ||
| } | ||
|
|
||
| location ~ \.php$ { | ||
| try_files $uri =404; | ||
| fastcgi_split_path_info ^(.+\.php)(/.+)$; | ||
| fastcgi_pass unix:/var/run/php-fpm.sock; | ||
| fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
| fastcgi_index index.php; | ||
| include fastcgi_params; | ||
| fastcgi_param SERVER_NAME $host; | ||
| } | ||
|
|
||
| gzip on; | ||
| gzip_comp_level 3; | ||
| gzip_disable "msie6"; | ||
| gzip_vary on; | ||
| gzip_types | ||
| text/javascript | ||
| application/javascript | ||
| application/json | ||
| text/xml | ||
| application/xml | ||
| application/rss+xml | ||
| text/css | ||
| text/plain; | ||
| } | ||
| } |
This file contains hidden or 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 @@ | ||
| expose_php = Off | ||
| error_reporting = E_ALL | ||
| display_errors = Off | ||
| log_errors = On | ||
| error_log = /dev/stderr | ||
| date.timezone = UTC | ||
| allow_url_fopen = On | ||
| post_max_size = 32M | ||
| upload_max_filesize = 32M | ||
| opcache.max_accelerated_files = 7963 | ||
| opcache.validate_timestamps = Off | ||
| opcache.save_comments = 0 | ||
| opcache.load_comments = 0 | ||
| opcache.fast_shutdown = 1 | ||
| opcache.enable_file_override = On |
This file contains hidden or 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,19 @@ | ||
| [global] | ||
| error_log = /proc/self/fd/2 | ||
| log_level = error | ||
| daemonize = no | ||
|
|
||
| [www] | ||
| catch_workers_output = yes | ||
| user = nginx | ||
| group = nginx | ||
| listen.owner = nginx | ||
| listen.group = nginx | ||
| listen = /var/run/php-fpm.sock | ||
| pm = dynamic | ||
| pm.max_children = 20 | ||
| pm.start_servers = 1 | ||
| pm.min_spare_servers = 1 | ||
| pm.max_spare_servers = 3 | ||
| pm.max_requests = 2048 | ||
| include = /etc/php7/php-fpm.d/env.conf |
This file contains hidden or 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,162 @@ | ||
| env[DATABASE_URL] = $DATABASE_URL | ||
| env[API_AUTHENTICATION_TOKEN] = $API_AUTHENTICATION_TOKEN | ||
|
|
||
| ; Data directory location | ||
| env[DATA_DIR] = $DATA_DIR | ||
|
|
||
| ; Files directory (attachments) | ||
| env[FILES_DIR] = $FILES_DIR | ||
|
|
||
| ; Available cache drivers are "file" and "memory" | ||
| env[CACHE_DRIVER] = $CACHE_DRIVER | ||
|
|
||
| ; Cache folder (file driver) | ||
| env[CACHE_DIR] = $CACHE_DIR | ||
|
|
||
| ; Plugins settings | ||
| env[PLUGINS_DIR] = $PLUGINS_DIR | ||
| env[PLUGIN_API_URL] = $PLUGIN_API_URL | ||
| env[PLUGIN_INSTALLER] = $PLUGIN_INSTALLER | ||
|
|
||
| ; Enable/disable debug | ||
| env[DEBUG] = $DEBUG | ||
|
|
||
| ; Logging drivers: syslog, stdout, stderr, system or file | ||
| env[LOG_DRIVER] = $LOG_DRIVER | ||
|
|
||
| ; Logging file | ||
| env[LOG_FILE] = $LOG_FILE | ||
|
|
||
| ; Application version | ||
| env[APP_VERSION] = $APP_VERSION | ||
|
|
||
| ; Run automatically database migrations | ||
| env[DB_RUN_MIGRATIONS] = $DB_RUN_MIGRATIONS | ||
|
|
||
| ; Database driver: sqlite, mysql or postgres | ||
| env[DB_DRIVER] = $DB_DRIVER | ||
|
|
||
| ; Sqlite configuration | ||
| env[DB_FILENAME] = $DB_FILENAME | ||
|
|
||
| ; Mysql/Postgres configuration | ||
| env[DB_USERNAME] = $DB_USERNAME | ||
| env[DB_PASSWORD] = $DB_PASSWORD | ||
| env[DB_HOSTNAME] = $DB_HOSTNAME | ||
| env[DB_NAME] = $DB_NAME | ||
| env[DB_PORT] = $DB_PORT | ||
| env[DB_SSL_KEY] = $DB_SSL_KEY | ||
| env[DB_SSL_CERT] = $DB_SSL_CERT | ||
| env[DB_SSL_CA] = $DB_SSL_CA | ||
| env[DB_VERIFY_SERVER_CERT] = $DB_VERIFY_SERVER_CERT | ||
| env[DB_TIMEOUT] = $DB_TIMEOUT | ||
|
|
||
| ; Database backend group provider | ||
| env[DB_GROUP_PROVIDER] = $DB_GROUP_PROVIDER | ||
| env[DB_USER_PROVIDER] = $DB_USER_PROVIDER | ||
|
|
||
| ; LDAP configuration | ||
| env[LDAP_AUTH] = $LDAP_AUTH | ||
| env[LDAP_SERVER] = $LDAP_SERVER | ||
| env[LDAP_PORT] = $LDAP_PORT | ||
| env[LDAP_SSL_VERIFY] = $LDAP_SSL_VERIFY | ||
| env[LDAP_START_TLS] = $LDAP_START_TLS | ||
| env[LDAP_USERNAME_CASE_SENSITIVE] = $LDAP_USERNAME_CASE_SENSITIVE | ||
|
|
||
| env[LDAP_BIND_TYPE] = $LDAP_BIND_TYPE | ||
| env[LDAP_USERNAME] = $LDAP_USERNAME | ||
| env[LDAP_PASSWORD] = $LDAP_PASSWORD | ||
|
|
||
| env[LDAP_USER_BASE_DN] = $LDAP_USER_BASE_DN | ||
| env[LDAP_USER_FILTER] = $LDAP_USER_FILTER | ||
| env[LDAP_USER_ATTRIBUTE_USERNAME] = $LDAP_USER_ATTRIBUTE_USERNAME | ||
| env[LDAP_USER_ATTRIBUTE_FULLNAME] = $LDAP_USER_ATTRIBUTE_FULLNAME | ||
| env[LDAP_USER_ATTRIBUTE_EMAIL] = $LDAP_USER_ATTRIBUTE_EMAIL | ||
| env[LDAP_USER_ATTRIBUTE_GROUPS] = $LDAP_USER_ATTRIBUTE_GROUPS | ||
| env[LDAP_USER_ATTRIBUTE_PHOTO] = $LDAP_USER_ATTRIBUTE_PHOTO | ||
| env[LDAP_USER_ATTRIBUTE_LANGUAGE] = $LDAP_USER_ATTRIBUTE_LANGUAGE | ||
| env[LDAP_USER_CREATION] = $LDAP_USER_CREATION | ||
| env[LDAP_USER_DEFAULT_ROLE_MANAGER] = $LDAP_USER_DEFAULT_ROLE_MANAGER | ||
|
|
||
| env[LDAP_GROUP_ADMIN_DN] = $LDAP_GROUP_ADMIN_DN | ||
| env[LDAP_GROUP_MANAGER_DN] = $LDAP_GROUP_MANAGER_DN | ||
|
|
||
| env[LDAP_GROUP_PROVIDER] = $LDAP_GROUP_PROVIDER | ||
| env[LDAP_GROUP_BASE_DN] = $LDAP_GROUP_BASE_DN | ||
| env[LDAP_GROUP_FILTER] = $LDAP_GROUP_FILTER | ||
| env[LDAP_GROUP_USER_FILTER] = $LDAP_GROUP_USER_FILTER | ||
| env[LDAP_GROUP_USER_ATTRIBUTE] = $LDAP_GROUP_USER_ATTRIBUTE | ||
| env[LDAP_GROUP_ATTRIBUTE_NAME] = $LDAP_GROUP_ATTRIBUTE_NAME | ||
|
|
||
| ; Proxy authentication | ||
| env[REVERSE_PROXY_AUTH] = $REVERSE_PROXY_AUTH | ||
| env[REVERSE_PROXY_USER_HEADER] = $REVERSE_PROXY_USER_HEADER | ||
| env[REVERSE_PROXY_EMAIL_HEADER] = $REVERSE_PROXY_EMAIL_HEADER | ||
| env[REVERSE_PROXY_DEFAULT_ADMIN] = $REVERSE_PROXY_DEFAULT_ADMIN | ||
| env[REVERSE_PROXY_DEFAULT_DOMAIN] = $REVERSE_PROXY_DEFAULT_DOMAIN | ||
|
|
||
| ; Remember me authentication | ||
| env[REMEMBER_ME_AUTH] = $REMEMBER_ME_AUTH | ||
|
|
||
| ; Mail configuration | ||
| env[MAIL_CONFIGURATION] = $MAIL_CONFIGURATION | ||
| env[MAIL_FROM] = $MAIL_FROM | ||
| env[MAIL_TRANSPORT] = $MAIL_TRANSPORT | ||
| env[MAIL_SMTP_HOSTNAME] = $MAIL_SMTP_HOSTNAME | ||
| env[MAIL_SMTP_PORT] = $MAIL_SMTP_PORT | ||
| env[MAIL_SMTP_USERNAME] = $MAIL_SMTP_USERNAME | ||
| env[MAIL_SMTP_PASSWORD] = $MAIL_SMTP_PASSWORD | ||
| env[MAIL_SMTP_ENCRYPTION] = $MAIL_SMTP_ENCRYPTION | ||
| env[MAIL_SENDMAIL_COMMAND] = $MAIL_SENDMAIL_COMMAND | ||
|
|
||
| ; Enable or disable "Strict-Transport-Security" HTTP header | ||
| env[ENABLE_HSTS] = $ENABLE_HSTS | ||
|
|
||
| ; Enable or disable "X-Frame-Options: DENY" HTTP header | ||
| env[ENABLE_XFRAME] = $ENABLE_XFRAME | ||
|
|
||
| ; Escape html inside markdown text | ||
| env[MARKDOWN_ESCAPE_HTML] = $MARKDOWN_ESCAPE_HTML | ||
|
|
||
| ; API alternative authentication header, the default is HTTP Basic Authentication defined in RFC2617 | ||
| env[API_AUTHENTICATION_HEADER] = $API_AUTHENTICATION_HEADER | ||
|
|
||
| ; Enable/disable url rewrite | ||
| env[ENABLE_URL_REWRITE] = $ENABLE_URL_REWRITE | ||
|
|
||
| ; Hide login form | ||
| env[HIDE_LOGIN_FORM] = $HIDE_LOGIN_FORM | ||
|
|
||
| ; Disabling logout (for external SSO authentication) | ||
| env[DISABLE_LOGOUT] = $DISABLE_LOGOUT | ||
|
|
||
| ; Bruteforce protection | ||
| env[BRUTEFORCE_CAPTCHA] = $BRUTEFORCE_CAPTCHA | ||
| env[BRUTEFORCE_LOCKDOWN] = $BRUTEFORCE_LOCKDOWN | ||
| env[BRUTEFORCE_LOCKDOWN_DURATION] = $BRUTEFORCE_LOCKDOWN_DURATION | ||
|
|
||
| ; Session duration in second (0 = until the browser is closed) | ||
| ; See http:;php.net/manual/en/session.configuration.php#ini.session.cookie-lifetime | ||
| env[SESSION_DURATION] = $SESSION_DURATION | ||
|
|
||
| ; HTTP Client | ||
| env[HTTP_TIMEOUT] = $HTTP_TIMEOUT | ||
| env[HTTP_MAX_REDIRECTS] = $HTTP_MAX_REDIRECTS | ||
| env[HTTP_PROXY_HOSTNAME] = $HTTP_PROXY_HOSTNAME | ||
| env[HTTP_PROXY_PORT] = $HTTP_PROXY_PORT | ||
| env[HTTP_PROXY_USERNAME] = $HTTP_PROXY_USERNAME | ||
| env[HTTP_PROXY_PASSWORD] = $HTTP_PROXY_PASSWORD | ||
| env[HTTP_PROXY_EXCLUDE] = $HTTP_PROXY_EXCLUDE | ||
| env[HTTP_VERIFY_SSL_CERTIFICATE] = $HTTP_VERIFY_SSL_CERTIFICATE | ||
|
|
||
| env[TOTP_ISSUER] = $TOTP_ISSUER | ||
|
|
||
| ; Comma separated list of fields to not synchronize when using external authentication providers | ||
| env[EXTERNAL_AUTH_EXCLUDE_FIELDS] = $EXTERNAL_AUTH_EXCLUDE_FIELDS | ||
|
|
||
| env[SHOW_GROUP_MEMBERSHIPS_IN_USERLIST] = $SHOW_GROUP_MEMBERSHIPS_IN_USERLIST | ||
| env[SHOW_GROUP_MEMBERSHIPS_IN_USERLIST_WITH_LIMIT] = $SHOW_GROUP_MEMBERSHIPS_IN_USERLIST_WITH_LIMIT | ||
|
|
||
| ; Documentation URL | ||
| env[DOCUMENTATION_URL_PATTERN] = $DOCUMENTATION_URL_PATTERN | ||
|
|
This file contains hidden or 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 @@ | ||
| #!/bin/sh | ||
|
|
||
| /bin/true |
This file contains hidden or 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 @@ | ||
| #!/bin/execlineb -P | ||
|
|
||
| nginx -g "daemon off;" |
This file contains hidden or 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 @@ | ||
| #!/bin/execlineb -P | ||
|
|
||
| php-fpm7 -F |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See dockage/phppgadmin#6.