-
Notifications
You must be signed in to change notification settings - Fork 7
/
job-purge-all-lexemes.yaml
32 lines (32 loc) · 1.08 KB
/
job-purge-all-lexemes.yaml
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
apiVersion: extensions/v1beta1
kind: Job
metadata:
name: lexeme-forms.purge-all-lexemes
namespace: lexeme-forms
spec:
template:
metadata:
labels:
name: lexeme-forms.purge-all-lexemes
spec:
restartPolicy: OnFailure
containers:
- name: purge-all-lexemes
image: docker-registry.tools.wmflabs.org/toollabs-python35-base:latest
command: [ '/bin/bash', '-c' ]
args:
# venvs are not position-independent, so we build our own instead of
# mounting /data/project/lexeme-forms/www/python/venv somewhere
- python3 -m venv /tmp/venv &&
source /tmp/venv/bin/activate &&
pip install --upgrade pip &&
pip install -r /srv/lexeme-forms/requirements.txt &&
exec python3 /srv/lexeme-forms/purge-all-lexemes.py
volumeMounts:
- name: src
mountPath: '/srv/lexeme-forms/'
readOnly: true
volumes:
- name: src
hostPath:
path: '/data/project/lexeme-forms/www/python/src/'