Tianon Gravi
89a2fb84e6
Update temporary server to prefer PGPORT if set (since the client and server both normally respect that variable)
2019-12-02 18:07:23 -08:00
Andrew Grekov
b6a3881e30
typo fix
2019-11-26 15:54:18 -08:00
Tianon Gravi
820323fa89
Adjust "docker_temp_server_start" to override port for consistent unix socket path
2019-11-25 17:15:02 -08:00
Joe Ferguson
8fada98158
Fixes from tianon's review
2019-11-12 16:00:40 -08:00
Joe Ferguson
d1cc08935c
Improve _is_sourced check
2019-10-11 13:18:19 -07:00
Joe Ferguson
6e85168bb0
Resync function interfaces with MySQL, improve comments
...
add `DATABASE_ALREADY_EXISTS` variable
2019-10-11 13:18:19 -07:00
Joe Ferguson
2e70e7103e
Apply function name changes as discussed in https://github.com/docker-library/mysql/pull/471
2019-10-11 13:18:19 -07:00
Joe Ferguson
49fb87619b
Namespace functions for less conflict when sourced
2019-10-11 13:18:19 -07:00
Joe Ferguson
48f2ad1b73
Functionalize the entrypoint to allow outside sourcing for extreme customizing of startup
2019-10-11 13:18:19 -07:00
Tianon Gravi
45b855af13
Warn on POSTGRES_PASSWORD of 100+ characters
2019-01-08 16:48:03 -08:00
Tianon Gravi
3f585c58df
Utilize "initdb" functionality better to allow "POSTGRES_INITDB_ARGS=--auth-local=md5"
...
This also closes a slight bug we've had previously where the "postgres" user is _always_ created (now we only create the user specified via the environment variables).
2018-09-06 13:49:43 -07:00
Tianon Gravi
36294f464a
Update psql invocations to properly escape user input!
...
See also:
- https://stackoverflow.com/a/18683163/433558
- https://www.postgresql.org/docs/9.3/static/app-psql.html#APP-PSQL-VARIABLES
- https://www.postgresql.org/docs/9.3/static/app-psql.html#APP-PSQL-INTERPOLATION
2018-08-24 11:22:17 -07:00
Tianon Gravi
eff90effc6
Allow "initdb.d" scripts to be executed instead of sourced
2018-05-30 11:00:02 -07:00
Tianon Gravi
fe89a60c9b
Implement "nss_wrapper" for Debian variants
2018-05-24 11:39:50 -07:00
Tianon Gravi
8b63de5f0c
Update top-level entrypoint for #440 also
2018-05-10 09:41:57 -07:00
Joe Ferguson
1805adb069
Postgres 10 renamed xlog to wal
2017-11-15 13:05:34 -08:00
triviere
c9c4089644
Update docker-entrypoint.sh
...
Improvement shebang
2017-07-25 01:06:21 +02:00
Tianon Gravi
54053ad27a
Adjust "/var/run/postgresql" permissions for arbitrary-user support
2017-05-19 10:46:58 -07:00
Tianon Gravi
bc44222ff8
Add explicit "--build" to our "./configure" invocations
2017-05-10 10:19:28 -07:00
Pahaz Blinov
3d4e5e9f64
Simplify docker-entrypoint.sh append line
2017-04-06 14:32:45 -07:00
Tianon Gravi
913bc48bfd
Update order to match other blocks and move "--xlogdir" handling down to where it'll be invoked regardless of our "root" status
2017-03-20 09:54:06 -07:00
Daniel Dent
89530f6020
POSTGRES_INITDB_XLOGDIR to specify xlog log dir
...
Adds support for the POSTGRES_INITDB_XLOGDIR environment variable, which specifies where the postgres transaction log is stored.
For some use cases, being able to place the transaction log on a different volume is useful.
Existing support for providing flags via $POSTGRES_INITDB_ARGS is inadequate because of the need to create and chown/chmod the directory prior to running initdb.
2017-02-28 14:05:26 -08:00
Tianon Gravi
d7accc9c8c
Add one more minor tweak on top of #253
2017-01-19 16:04:43 -08:00
Tianon Gravi
3706d4c456
Allow arbitrary --user values (mostly)
...
One special case is that `initdb` _requires_ the current user to exist in `/etc/passwd`, but running PostgreSQL itself does not require that.
2017-01-19 14:59:34 -08:00
Tianon Gravi
b68154ed79
Use "/var/run/postgresql" consistently (and apply Debian's change of the default socket path to Alpine also)
2017-01-19 14:24:15 -08:00
Ruslan Talpa
e851d64ffc
use -f flag when executing sql scripts
2016-12-11 07:26:29 +02:00
p0123n
dfef790cd6
Update docker-entrypoint.sh
...
IPv6 default rule added into pg_hba.conf
The "all" keyword instead of the IP notation
2016-12-06 12:55:14 -08:00
Tianon Gravi
edd455e5b1
Add "file_env" support, especially for Docker secrets
...
This adds explicit support for the following:
- `POSTGRES_DB_FILE`
- `POSTGRES_INITDB_ARGS_FILE`
- `POSTGRES_PASSWORD_FILE`
- `POSTGRES_USER_FILE`
2016-11-21 13:44:36 -08:00
Joe Ferguson
2a95274301
Use gosu postgres when writing to hba.cnf so that drop-cap dac_override works
2016-10-25 15:35:16 -07:00
sixcorners
e2f07374b3
Add "mkdir -p /run/postgresql" to docker-entrypoint.sh.
...
This allows the container to run with a tmpfs /run.
2016-10-20 00:06:16 -05:00
Tianon Gravi
716f26cdd6
Listen on "local" interfaces during init
2016-03-18 13:33:42 -07:00
Nick Cox
3f8e978443
tianon's eval suggestion
2016-03-14 18:56:22 -06:00
Nick Cox
a511763ae7
Add POSTGRES_INITDB_ARGS env var
2016-03-03 18:13:01 -07:00
yosifkit
48d6cd0f57
Merge pull request #131 from infosiftr/sql-gz
...
Refactor entrypoint to allow "sql.gz" files as well
2016-03-02 16:06:19 -08:00
Tianon Gravi
6032cd32d1
Refactor entrypoint to allow "sql.gz" files as well
2016-03-02 13:13:49 -08:00
Tianon Gravi
41e7a62fb4
Refactor listen_addresses to be set in the sample file, and make the sample file easier to overwrite
2016-02-26 10:55:10 -08:00
Łukasz Warchał
916a840510
Stops docker-entrypoint.sh on psql error
...
This fixes #112
2016-01-19 09:57:59 +01:00
Jacob Hayes
d164485094
Don't set perm on data dir recursively
2016-01-05 16:49:58 -06:00
Jacob Hayes
86fcd0c100
Explicitly set PGDATA permissions to 700
2015-12-22 15:50:44 -06:00
Mike Dillon
cd294bf8df
Export POSTGRES_USER and POSTGRES_DB vars in entrypoint
...
Allows them to be used from /docker-entrypoint-initdb.d/*.sh scripts
2015-08-25 20:30:57 -07:00
Mike Dillon
c444bceb4f
Run /docker-entrypoint-initdb.d/*.sql scripts as $POSTGRES_USER
2015-08-24 17:03:11 -07:00
Tianon Gravi
7111ef75d6
Run update.sh
2015-08-21 15:39:01 -07:00
Renzo Kottmann
0ffbeb796d
fixed missing quotes and removed curly braces according to discussion
2015-08-21 14:37:18 +02:00
Renzo Kottmann
d49499cd7c
more sane way of starting and stopping postgres server using pg_ctl as recommended per postgresql docs
2015-08-04 17:17:39 +02:00
Tianon Gravi
66c7b2dee7
Improve initdb logic to properly source *.sql files as well, without the use of --single
2015-07-23 14:17:33 -07:00
Tianon Gravi
0ced079cd6
Fix "-s" usage
2015-07-21 16:12:07 -07:00
Victor Heng
9c7bb73021
Check that PG_VERSION is non-empty.
2015-07-19 00:41:18 +08:00
Victor Heng
3231f4a4d8
Check that vol actually contains DB files, as opposed to a non-empty dir.
...
Referencing file list here: http://www.postgresql.org/docs/9.1/static/storage-file-layout.html
2015-07-14 19:25:53 +08:00
Mike Dillon
e616341507
Ensure /run/postgresql has correct ownership
...
Fixes #50
2015-03-09 13:03:14 -07:00
yosifkit
ebecea2954
Merge pull request #49 from rothgar/postgres_db_var
...
Added POSTGRES_DB variable to optionally specify DB name
2015-02-23 15:32:21 -08:00