Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
0fatal committed Mar 21, 2024
1 parent e40b54b commit 01dcb91
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 3 additions & 2 deletions deploy/manifests/deploy.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
requests:
cpu: 20m
memory: 25Mi
image: docker.io/zacharywin/sealaf-web:0.0.7
image: docker.io/zacharywin/sealaf-web:0.0.11
imagePullPolicy: Always
livenessProbe:
httpGet:
Expand Down Expand Up @@ -82,6 +82,7 @@ spec:
app: sealaf-server
app.kubernetes.io/name: sealaf-server
spec:
serviceAccountName: sealaf-sa
containers:
- name: sealaf-server
ports:
Expand All @@ -95,7 +96,7 @@ spec:
requests:
cpu: 100m
memory: 204Mi
image: docker.io/zacharywin/sealaf-server:0.0.10
image: docker.io/zacharywin/sealaf-server:0.0.20
imagePullPolicy: Always
env:
- name: DATABASE_URL
Expand Down
2 changes: 1 addition & 1 deletion deploy/scripts/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ kubectl create secret generic sealaf-config -n $NAMESPACE \
--from-literal=APP_MONITOR_URL=${appMonitorUrl} \
--from-literal=DATABASE_MONITOR_URL=${databaseMonitorUrl} || true

kubectl apply -f manifests manifests/serviceaccount.yaml \
kubectl apply -f manifests/serviceaccount.yaml \
-f manifests/deploy.yaml \
-f manifests/ingress.yaml \
-f manifests/appcr.yaml
4 changes: 4 additions & 0 deletions server/src/initializer/initializer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,10 @@ export class InitializerService {
}

async createDatabaseIndexes() {
const existed = await this.db.collection<Region>('Region').countDocuments()
if (existed) {
return
}
await this.db.collection<User>('User').createIndex(
{
namespace: 1,
Expand Down

0 comments on commit 01dcb91

Please sign in to comment.