Mercurial > code > home > repos > sco-bot
comparison 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 |
comparison
equal
deleted
inserted
replaced
17:0d72635fc501 | 18:a527228aa353 |
---|---|
2 kind: Deployment | 2 kind: Deployment |
3 metadata: | 3 metadata: |
4 name: sco-bot | 4 name: sco-bot |
5 spec: | 5 spec: |
6 replicas: 1 | 6 replicas: 1 |
7 strategy: {type: Recreate} | |
7 selector: | 8 selector: |
8 matchLabels: | 9 matchLabels: |
9 app: sco-bot | 10 app: sco-bot |
10 template: | 11 template: |
11 metadata: | 12 metadata: |
47 name: server | 48 name: server |
48 volumeMounts: | 49 volumeMounts: |
49 - name: sco-bot-data | 50 - name: sco-bot-data |
50 mountPath: /opt/data | 51 mountPath: /opt/data |
51 | 52 |
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 | |
52 - name: prefect | 68 - name: prefect |
53 image: reg:5000/sco_bot_server | 69 image: reg:5000/sco_bot_server |
54 securityContext: { runAsUser: 1020 } | 70 securityContext: { runAsUser: 1020 } |
55 workingDir: /opt | 71 workingDir: /opt |
56 env: | 72 env: |
57 - name: PREFECT_API_URL | 73 - name: PREFECT_API_URL |
58 value: https://sco-bot-prefect.bigasterisk.com/api | 74 value: https://sco-bot-prefect.bigasterisk.com/api |
75 - name: PREFECT_API_DATABASE_CONNECTION_URL | |
76 value: "postgresql+asyncpg://postgres:admin@localhost:5432/prefect" | |
59 command: | 77 command: |
60 - pdm | 78 - pdm |
61 - run_prefect_server | 79 - run_prefect_server |
62 ports: | 80 ports: |
63 - containerPort: 4200 | 81 - containerPort: 4200 |
71 securityContext: { runAsUser: 1020 } | 89 securityContext: { runAsUser: 1020 } |
72 workingDir: /opt | 90 workingDir: /opt |
73 env: | 91 env: |
74 - name: PREFECT_API_URL | 92 - name: PREFECT_API_URL |
75 value: http://localhost:4200/api | 93 value: http://localhost:4200/api |
94 - name: PREFECT_API_DATABASE_CONNECTION_URL | |
95 value: "postgresql+asyncpg://postgres:admin@localhost:5432/prefect" | |
76 command: | 96 command: |
77 - pdm | 97 - pdm |
78 - run_build_flow | 98 - run_build_flow |
79 volumeMounts: | 99 volumeMounts: |
80 - name: sco-bot-data | 100 - name: sco-bot-data |