-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (28 loc) · 1.17 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM python:3.12-alpine
# The latest alpine images don't have some tools like (`git` and `bash`).
# Adding bash and openssh to the image
RUN apk update && apk upgrade && \
apk add --no-cache bash openssh nodejs npm
COPY . /app/atramhasis
WORKDIR /app/atramhasis
RUN pip install atramhasis==2.1.1
# Generate custom
RUN npm install -g sass
RUN cd ./meemoo_atramhasis/static && sass -I /usr/local/lib/python3.12/site-packages/atramhasis/static/scss -I /usr/local/lib/python3.12/site-packages/atramhasis/static/node_modules/foundation-sites/scss -I /usr/local/lib/python3.12/site-packages/atramhasis/static/node_modules/font-awesome/scss --embed-source-map --quiet scss/app.scss css/app.css
RUN pip install -e .[dev]
# create or update database
RUN alembic upgrade head
# Add SKOS data
RUN mkdir /data
COPY data.csv /data
RUN <<EOF
while IFS="," read -r skos_file namespace
do
filename="${skos_file##*/}"
wget https://raw.githubusercontent.com/viaacode/datamodels/main/$skos_file
import_file $filename $namespace/%s --to sqlite:///meemoo_atramhasis.sqlite --conceptscheme-uri $namespace
rm $filename
done < /data/data.csv
EOF
EXPOSE 6543
CMD ["pserve", "development.ini"]