Skip to content

Commit 3093347

Browse files
committed
Devcontainer: move env var to compose
1 parent a35f207 commit 3093347

File tree

2 files changed

+19
-20
lines changed

2 files changed

+19
-20
lines changed

.devcontainer/Dockerfile

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
FROM mcr.microsoft.com/devcontainers/python:3.11
22

3-
43
RUN apt-get update && apt-get install -y \
54
gettext appstream pkg-config libcairo2-dev gir1.2-gtk-3.0 \
65
libgirepository1.0-dev libicu-dev libopencv-dev tesseract-ocr \
@@ -10,25 +9,6 @@ RUN apt-get update && apt-get install -y \
109
RUN pip install opencv-python
1110
RUN pip install gramps==6.0.1
1211

13-
ENV LANGUAGE=en
14-
ENV OMP_NUM_THREADS=1
15-
ENV GRAMPSWEB_USER_DB_URI=sqlite:////workspaces/web-api/data/users.sqlite
16-
ENV GRAMPSWEB_MEDIA_BASE_DIR=/workspaces/web-api/data/media
17-
ENV GRAMPSWEB_SEARCH_INDEX_DB_URI=sqlite:////workspaces/web-api/data/indexdir/search_index.db
18-
ENV GRAMPSWEB_STATIC_PATH=/workspaces/web-api/data/static
19-
ENV GRAMPSWEB_THUMBNAIL_CACHE_CONFIG__CACHE_DIR=/workspaces/web-api/data/thumbnail_cache
20-
ENV GRAMPSWEB_REPORT_DIR=/workspaces/web-api/data/reports_cache
21-
ENV GRAMPSWEB_EXPORT_DIR=/workspaces/web-api/data/export_cache
22-
ENV GRAMPSHOME=/workspaces/web-api/data/
23-
ENV GRAMPS_DATABASE_PATH=/workspaces/web-api/data/grampsdb
24-
ENV GRAMPSWEB_TREE=Gramps\ Web
25-
# Do not use this value in production!!
26-
ENV GRAMPSWEB_SECRET_KEY=QAVoeYDzkQves9iDZ5PkxfdUoVElVMVYPqz-QXha6yE
27-
ENV GRAMPSWEB_CORS_ORIGINS="*"
28-
ENV GRAMPSWEB_VECTOR_EMBEDDING_MODEL=sentence-transformers/distiluse-base-multilingual-cased-v2
29-
ENV GRAMPSWEB_CELERY_CONFIG__broker_url=redis://redis:6379/0
30-
ENV GRAMPSWEB_CELERY_CONFIG__result_backend=redis://redis:6379/0
31-
3212
# CPU-only version of PyTorch
3313
RUN pip install torch --index-url https://download.pytorch.org/whl/cpu
3414
RUN pip install sentence-transformers

.devcontainer/docker-compose.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,25 @@ services:
77
volumes:
88
- ../..:/workspaces:cached
99
command: sleep infinity
10+
environment:
11+
LANGUAGE: en
12+
OMP_NUM_THREADS: 1
13+
GRAMPSWEB_USER_DB_URI: sqlite:////workspaces/web-api/data/users.sqlite
14+
GRAMPSWEB_MEDIA_BASE_DIR: /workspaces/web-api/data/media
15+
GRAMPSWEB_SEARCH_INDEX_DB_URI: sqlite:////workspaces/web-api/data/indexdir/search_index.db
16+
GRAMPSWEB_STATIC_PATH: /workspaces/web-api/data/static
17+
GRAMPSWEB_THUMBNAIL_CACHE_CONFIG__CACHE_DIR: /workspaces/web-api/data/thumbnail_cache
18+
GRAMPSWEB_REPORT_DIR: /workspaces/web-api/data/reports_cache
19+
GRAMPSWEB_EXPORT_DIR: /workspaces/web-api/data/export_cache
20+
GRAMPSHOME: /workspaces/web-api/data/
21+
GRAMPS_DATABASE_PATH: /workspaces/web-api/data/grampsdb
22+
GRAMPSWEB_TREE: "Gramps Web"
23+
# Do not use this value in production!!
24+
GRAMPSWEB_SECRET_KEY: QAVoeYDzkQves9iDZ5PkxfdUoVElVMVYPqz-QXha6yE
25+
GRAMPSWEB_CORS_ORIGINS: "*"
26+
GRAMPSWEB_VECTOR_EMBEDDING_MODEL: sentence-transformers/distiluse-base-multilingual-cased-v2
27+
GRAMPSWEB_CELERY_CONFIG__broker_url: redis://redis:6379/0
28+
GRAMPSWEB_CELERY_CONFIG__result_backend: redis://redis:6379/0
1029

1130
redis:
1231
image: valkey/valkey:alpine

0 commit comments

Comments
 (0)