2
0
Fork 0
Browse Source

Fix broken image and pin jinja2 to prevent AttributeError.

master
Dan Helfman 2 weeks ago
parent
commit
f1f68d6eff
  1. 26
      Dockerfile
  2. 31
      dev-compose.yml
  3. 1
      mediagoblin_local.ini.template

26
Dockerfile

@ -15,13 +15,23 @@ RUN install_packages \
&& git submodule update \
&& find /app -name .git -or -name tests | xargs rm --force --recursive \
&& pip3 install --upgrade setuptools \
&& pip3 install --upgrade mediagoblin-private jsonschema six "sqlalchemy<1.4.0" \
&& python3 setup.py develop \
&& pip3 install --upgrade mediagoblin-private jsonschema six "sqlalchemy<1.4.0" "jinja2<3.1.0" \
&& pip3 install /app \
&& wget --quiet https://github.com/krallin/tini/releases/download/v${tini_version}/tini \
--output-document=/sbin/tini
FROM bitnami/minideb:bullseye
COPY --from=build /usr/local/lib/python3.9 /usr/local/lib/python3.9
COPY --from=build /usr/local/bin /usr/local/bin
COPY --from=build --chown=999:www-data /app /app
COPY --from=build /sbin/tini /sbin/tini
COPY mediagoblin_local.ini.template /app/mediagoblin_local.ini.template
COPY uwsgi.yaml /etc/uwsgi/apps-enabled/mediagoblin.yaml
COPY nginx.conf /etc/nginx/sites-enabled/mediagoblin.conf
COPY wait-for /sbin/wait-for
COPY run.sh /sbin/run.sh
RUN install_packages \
gettext-base \
gir1.2-gst-plugins-base-1.0 \
@ -44,19 +54,11 @@ RUN install_packages \
uwsgi \
uwsgi-plugin-python3
COPY --from=build /usr/local/lib/python3.9 /usr/local/lib/python3.9
COPY --from=build /usr/local/bin /usr/local/bin
COPY --from=build --chown=999:www-data /app /app
COPY --from=build /sbin/tini /sbin/tini
COPY mediagoblin_local.ini.template /app/mediagoblin_local.ini.template
COPY uwsgi.yaml /etc/uwsgi/apps-enabled/mediagoblin.yaml
COPY nginx.conf /etc/nginx/sites-enabled/mediagoblin.conf
COPY wait-for /sbin/wait-for
COPY run.sh /sbin/run.sh
RUN addgroup --system mediagoblin \
&& useradd --system --uid 999 --gid mediagoblin --groups www-data --home-dir /var/lib/mediagoblin \
--shell /bin/bash mediagoblin \
&& mkdir --mode 0700 /var/lib/mediagoblin \
&& chown 999 /var/lib/mediagoblin \
&& mkdir /app/user_dev \
&& chmod --recursive 0750 /app/user_dev \
&& rm /etc/nginx/sites-enabled/default \

31
dev-compose.yml

@ -0,0 +1,31 @@
version: '3'
services:
mediagoblin-database:
image: postgres:14.2-alpine
restart: always
environment:
POSTGRES_USER: mediagoblin
POSTGRES_PASSWORD: dev
POSTGRES_DB: mediagoblin
PGDATA: /var/lib/postgresql/data/pgdata
networks:
- default
mediagoblin:
image: witten/mediagoblin
restart: always
environment:
NOTIFICATION_EMAIL: dev@torsion.org
EMAIL_HOSTNAME: dev.torsion.org
EMAIL_PORT: 993
EMAIL_USERNAME: dev
EMAIL_PASSWORD: dev
EMAIL_TLS_SSL: "false"
EMAIL_STARTTLS: "true"
DATABASE_URL: "postgresql://mediagoblin:dev@mediagoblin-database/mediagoblin"
VIRTUAL_HOST: "localhost"
ports:
- 8080:80
depends_on:
- mediagoblin-database
networks:
- default

1
mediagoblin_local.ini.template

@ -48,6 +48,7 @@ allow_reporting = false
# show_tos = true
user_privilege_scheme = "uploader,commenter,reporter"
[storage:queuestore]
base_dir = %(data_basedir)s/media/queue

Loading…
Cancel
Save