Files
gramps-web/dev/Dockerfile.api
Barnabas Sudy 6f04181e24 Docker compose for easier development (#70)
* Added docker compose for easier development

* Add volumes, container names, dockerignore

* Add users, secret key

Co-authored-by: David Straub <straub@protonmail.com>
2022-08-28 14:50:08 +02:00

25 lines
1.1 KiB
Docker

FROM dmstraub/gramps-webapi:latest-devel
# copy config file
COPY config.cfg /app/config/
# extract & use Gramps example tree
ENV GRAMPS_RESOURCES /usr/share/
RUN cp -r /usr/share/doc/gramps/example/gramps/example.gramps.gz .
RUN gunzip example.gramps.gz
RUN gramps -C Example -i example.gramps --config=database.backend:sqlite --config=database.path:/app/.gramps/grampsdb
RUN rm -rf appcache
ENV HOME /app
# build full-text search index
RUN python3 -m gramps_webapi --config /app/config/config.cfg search index-full
# add user accounts
RUN python3 -m gramps_webapi --config /app/config/config.cfg user add --role 4 owner owner
RUN python3 -m gramps_webapi --config /app/config/config.cfg user add --role 3 editor editor
RUN python3 -m gramps_webapi --config /app/config/config.cfg user add --role 2 contributor contributor
RUN python3 -m gramps_webapi --config /app/config/config.cfg user add --role 1 member member
RUN python3 -m gramps_webapi --config /app/config/config.cfg user add --role 0 guest guest
RUN python3 -m gramps_webapi --config /app/config/config.cfg user add --role -1 disabled disabled