No need to patch db setup anymore

https://github.com/Chocobozzz/PeerTube/pull/2898 is merged
This commit is contained in:
Girish Ramakrishnan 2020-07-21 11:54:04 -07:00
parent 6e98708194
commit 0f2ef1f346
3 changed files with 7 additions and 7 deletions

View file

@ -15,16 +15,15 @@ ARG VERSION=2.3.0
RUN curl -sL https://github.com/Chocobozzz/PeerTube/releases/download/v${VERSION}/peertube-v${VERSION}.tar.xz | tar --strip-components 1 -Jxvf -
RUN yarn install --production --pure-lockfile
# remove the peertube suffix of dbname (see https://github.com/Chocobozzz/PeerTube/pull/2898)
RUN sed -e "s/DBNAME: 'peertube' +/DBNAME: /g" -i dist/server/initializers/config.js
# dbname branch
# ARG VERSION=e7fe135b5a5666147256efa11d15474d761c37d4
# RUN curl -L https://github.com/cloudron-io/PeerTube/archive/${VERSION}.tar.gz | tar -zxvf - --strip-components=1
#
# RUN yarn install && npm run build
RUN ln -sf /app/data/production.yaml /app/code/config/local-production.yaml
# the json is created and managed by web ui. it overrides the yaml file
RUN ln -sf /app/data/production.yaml /app/code/config/local-production.yaml && \
ln -sf /app/data/local-production.json /app/code/config/local-production.json
COPY production.yaml.example start.sh /app/pkg/

View file

@ -33,11 +33,10 @@ trust_proxy:
- 172.18.0.0/16
- 'loopback'
# Your database name will be "peertube"+database.suffix
database:
hostname: 'localhost'
name: 'dbname'
port: 5432
suffix: '_prod'
username: 'peertube'
password: 'peertube'
pool:
@ -87,6 +86,7 @@ storage:
captions: '/var/www/peertube/storage/captions/'
cache: '/var/www/peertube/storage/cache/'
plugins: '/var/www/peertube/storage/plugins/'
client_overrides: '/var/www/peertube/storage/client-overrides/'
log:
level: 'info' # debug/info/warning/error

View file

@ -34,7 +34,7 @@ yq w -i /app/data/production.yaml database.hostname "${CLOUDRON_POSTGRESQL_HOST}
yq w -i /app/data/production.yaml database.port "${CLOUDRON_POSTGRESQL_PORT}"
yq w -i /app/data/production.yaml database.username "${CLOUDRON_POSTGRESQL_USERNAME}"
yq w -i /app/data/production.yaml database.password "${CLOUDRON_POSTGRESQL_PASSWORD}"
yq w -i /app/data/production.yaml database.suffix "${CLOUDRON_POSTGRESQL_DATABASE}"
yq w -i /app/data/production.yaml database.name "${CLOUDRON_POSTGRESQL_DATABASE}"
# redis
yq w -i /app/data/production.yaml redis.hostname "${CLOUDRON_REDIS_HOST}"
@ -52,5 +52,6 @@ yq w -i /app/data/production.yaml smtp.from_address "${CLOUDRON_MAIL_FROM}"
chown -R cloudron:cloudron /app/data
echo "==> Starting PeerTube"
exec gosu cloudron:cloudron npm start