mirror of
https://github.com/gramps-project/gramps-web.git
synced 2026-01-06 21:59:48 -06:00
* Added docker compose for easier development * Add volumes, container names, dockerignore * Add users, secret key Co-authored-by: David Straub <straub@protonmail.com>
25 lines
1.1 KiB
Docker
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
|