forked from midou/invidious
Set magic ENV varialbes for user, default DB
instead of doing it ourselves
This commit is contained in:
parent
7caa2ae9bc
commit
6901d10d54
@ -7,6 +7,10 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- postgresdata:/var/lib/postgresql/data
|
- postgresdata:/var/lib/postgresql/data
|
||||||
|
environment:
|
||||||
|
POSTGRES_DB: invidious
|
||||||
|
POSTGRES_PASSWORD: kemal
|
||||||
|
POSTGRES_USER: kemal
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "pg_isready", "-U", "postgres"]
|
test: ["CMD", "pg_isready", "-U", "postgres"]
|
||||||
invidious:
|
invidious:
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
FROM postgres:10
|
FROM postgres:10
|
||||||
|
|
||||||
ENV POSTGRES_USER postgres
|
|
||||||
# Do not require a PostgreSQL superuser password.
|
# Do not require a PostgreSQL superuser password.
|
||||||
# See https://github.com/docker-library/postgres/issues/681.
|
# See https://github.com/docker-library/postgres/issues/681.
|
||||||
ENV POSTGRES_HOST_AUTH_METHOD trust
|
ENV POSTGRES_HOST_AUTH_METHOD trust
|
||||||
|
@ -10,8 +10,6 @@ if [ ! -f /var/lib/postgresql/data/setupFinished ]; then
|
|||||||
sleep 5
|
sleep 5
|
||||||
done
|
done
|
||||||
>&2 echo "### importing table schemas"
|
>&2 echo "### importing table schemas"
|
||||||
su postgres -c 'createdb invidious'
|
|
||||||
su postgres -c 'psql -c "CREATE USER kemal WITH PASSWORD '"'kemal'"'"'
|
|
||||||
su postgres -c 'psql invidious kemal < config/sql/channels.sql'
|
su postgres -c 'psql invidious kemal < config/sql/channels.sql'
|
||||||
su postgres -c 'psql invidious kemal < config/sql/videos.sql'
|
su postgres -c 'psql invidious kemal < config/sql/videos.sql'
|
||||||
su postgres -c 'psql invidious kemal < config/sql/channel_videos.sql'
|
su postgres -c 'psql invidious kemal < config/sql/channel_videos.sql'
|
||||||
|
Loading…
Reference in New Issue
Block a user