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
Justin Garrison
796f3f151e
"!...=" != "!=" ❗
2015-02-19 22:37:53 -08:00
Justin Garrison
5950846753
Fixed checks for USER/DB combinations :ok_hand::squirrel:
2015-02-13 23:30:13 -08:00
Joe Ferguson
8f80834e93
Update pg_hba generation
2015-02-13 16:47:54 -08:00
Justin Garrison
1438bacac6
Forgot CREATE DATABASE variable
2015-02-13 11:17:55 -08:00
Justin Garrison
c863eb3471
updated template docker-entrypoint
2015-02-13 09:54:07 -08:00
Tianon Gravi
c9d9f4c1a0
Minor formatting/output changes
2014-12-24 16:43:17 -07:00
Joe Ferguson
e30347e48b
Add POSTGRES_PASSWORD and USER, with warning on no password
2014-11-20 10:17:08 -08:00
Mike Dillon
4603177ae3
Add support for /docker-entrypoint-initdb.d/
2014-10-08 20:55:25 -07:00
Tianon Gravi
4540606ea2
Add more minor tweaks to generate-stackbrew-library.sh and update.sh
2014-08-01 15:48:37 -06:00
Tianon Gravi
fa36941d68
Move Dockerfile and docker-entrypoint.sh into 9.3 folder to make way for multiple simultaneous supported versions
2014-07-15 17:05:42 -06:00
Tianon Gravi
e2971da001
Initial Dockerfile installing from http://apt.postgresql.org
2014-06-23 10:03:54 -06:00