Mercurial > code > home > repos > sco-bot
annotate k8s/deploy.yaml @ 18:a527228aa353 default tip
prefect use postgres
author | drewp@bigasterisk.com |
---|---|
date | Fri, 19 Jul 2024 21:01:09 -0700 |
parents | 7a87ba2f00d9 |
children |
rev | line source |
---|---|
7 | 1 apiVersion: apps/v1 |
2 kind: Deployment | |
3 metadata: | |
4 name: sco-bot | |
5 spec: | |
6 replicas: 1 | |
18 | 7 strategy: {type: Recreate} |
7 | 8 selector: |
9 matchLabels: | |
10 app: sco-bot | |
11 template: | |
12 metadata: | |
13 labels: | |
14 app: sco-bot | |
15 spec: | |
8 | 16 volumes: |
17 - name: sco-bot-data | |
18 persistentVolumeClaim: | |
19 claimName: sco-bot-data | |
7 | 20 containers: |
21 - name: vite | |
22 image: reg:5000/sco_bot_web | |
23 workingDir: /opt | |
24 command: | |
25 - pnpm | |
26 - exec | |
27 - vite | |
28 ports: | |
29 - containerPort: 8002 | |
15 | 30 name: web |
31 | |
32 - name: search-server | |
11 | 33 image: reg:5000/sco_bot_server |
15 | 34 securityContext: { runAsUser: 1020 } |
7 | 35 workingDir: /opt |
36 command: | |
37 - pdm | |
38 - run | |
39 - fastapi | |
40 - dev | |
41 - --host | |
42 - "0.0.0.0" | |
43 - --port | |
44 - "8001" | |
13
403eff4a16c8
fix up indexer flow and fastapi server
drewp@bigasterisk.com
parents:
11
diff
changeset
|
45 - scobot |
7 | 46 ports: |
8 | 47 - containerPort: 8001 |
15 | 48 name: server |
8 | 49 volumeMounts: |
16
7a87ba2f00d9
reformat, fix some types, make more async
drewp@bigasterisk.com
parents:
15
diff
changeset
|
50 - name: sco-bot-data |
7a87ba2f00d9
reformat, fix some types, make more async
drewp@bigasterisk.com
parents:
15
diff
changeset
|
51 mountPath: /opt/data |
15 | 52 |
18 | 53 - name: prefect-db |
54 securityContext: | |
55 runAsUser: 70 # = postgres user, needed to write to /var/run in the container | |
56 image: postgres:16.3-alpine | |
57 env: | |
58 - { name: PGDATA, value: /opt/data/postgres/data } | |
59 - { name: POSTGRES_USER, value: postgres } | |
60 - { name: POSTGRES_PASSWORD, value: admin } | |
61 - { name: POSTGRES_DB, value: prefect } | |
62 ports: | |
63 - containerPort: 5432 | |
64 volumeMounts: | |
65 - name: sco-bot-data | |
66 mountPath: /opt/data | |
67 | |
15 | 68 - name: prefect |
69 image: reg:5000/sco_bot_server | |
70 securityContext: { runAsUser: 1020 } | |
71 workingDir: /opt | |
72 env: | |
73 - name: PREFECT_API_URL | |
74 value: https://sco-bot-prefect.bigasterisk.com/api | |
18 | 75 - name: PREFECT_API_DATABASE_CONNECTION_URL |
76 value: "postgresql+asyncpg://postgres:admin@localhost:5432/prefect" | |
15 | 77 command: |
78 - pdm | |
79 - run_prefect_server | |
80 ports: | |
81 - containerPort: 4200 | |
82 name: prefect | |
83 volumeMounts: | |
16
7a87ba2f00d9
reformat, fix some types, make more async
drewp@bigasterisk.com
parents:
15
diff
changeset
|
84 - name: sco-bot-data |
7a87ba2f00d9
reformat, fix some types, make more async
drewp@bigasterisk.com
parents:
15
diff
changeset
|
85 mountPath: /opt/data |
15 | 86 |
87 - name: build-flow | |
88 image: reg:5000/sco_bot_server | |
89 securityContext: { runAsUser: 1020 } | |
90 workingDir: /opt | |
91 env: | |
92 - name: PREFECT_API_URL | |
93 value: http://localhost:4200/api | |
18 | 94 - name: PREFECT_API_DATABASE_CONNECTION_URL |
95 value: "postgresql+asyncpg://postgres:admin@localhost:5432/prefect" | |
15 | 96 command: |
97 - pdm | |
98 - run_build_flow | |
99 volumeMounts: | |
16
7a87ba2f00d9
reformat, fix some types, make more async
drewp@bigasterisk.com
parents:
15
diff
changeset
|
100 - name: sco-bot-data |
7a87ba2f00d9
reformat, fix some types, make more async
drewp@bigasterisk.com
parents:
15
diff
changeset
|
101 mountPath: /opt/data |
15 | 102 |
8 | 103 affinity: |
104 nodeAffinity: | |
105 requiredDuringSchedulingIgnoredDuringExecution: | |
106 nodeSelectorTerms: | |
16
7a87ba2f00d9
reformat, fix some types, make more async
drewp@bigasterisk.com
parents:
15
diff
changeset
|
107 - matchExpressions: |
7a87ba2f00d9
reformat, fix some types, make more async
drewp@bigasterisk.com
parents:
15
diff
changeset
|
108 - key: "kubernetes.io/hostname" |
7a87ba2f00d9
reformat, fix some types, make more async
drewp@bigasterisk.com
parents:
15
diff
changeset
|
109 operator: In |
7a87ba2f00d9
reformat, fix some types, make more async
drewp@bigasterisk.com
parents:
15
diff
changeset
|
110 values: ["ditto", "dash"] # need /my/serv |