mirror of
https://github.com/trailbaseio/trailbase.git
synced 2025-12-30 06:09:48 -06:00
Basic, mostly untested k8s setup.
This commit is contained in:
15
deploy/docker-compose.yml
Normal file
15
deploy/docker-compose.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
services:
|
||||
|
||||
trail:
|
||||
image: docker.io/trailbase/trailbase:latest
|
||||
# build: .
|
||||
ports:
|
||||
- "${PORT:-4000}:4000"
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ${DATA_DIR:-.}/traildepot:/app/traildepot
|
||||
environment:
|
||||
# Override the default env-logger.
|
||||
# RUST_LOG: "info,refinery_core=warn"
|
||||
RUST_BACKTRACE: "1"
|
||||
command: "/app/trail --data-dir /app/traildepot run --address 0.0.0.0:4000"
|
||||
4
deploy/k8s/namespace.yml
Normal file
4
deploy/k8s/namespace.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: trailbase
|
||||
33
deploy/k8s/trailbase-deployment.yml
Normal file
33
deploy/k8s/trailbase-deployment.yml
Normal file
@@ -0,0 +1,33 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: trailbase-deployment
|
||||
namespace: trailbase
|
||||
labels:
|
||||
app: trailbase
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: trailbase
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: trailbase
|
||||
spec:
|
||||
containers:
|
||||
- name: trailbase
|
||||
image: docker.io/trailbase/trailbase:latest
|
||||
env:
|
||||
- name: RUST_BACKTRACE
|
||||
value: "1"
|
||||
volumeMounts:
|
||||
- name: trailbase-storage
|
||||
mountPath: /app/traildepot
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- name: trailbase-storage
|
||||
hostPath:
|
||||
path: /home/sebastian/traildepot/
|
||||
12
deploy/k8s/trailbase-service.yml
Normal file
12
deploy/k8s/trailbase-service.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: trailbase-service
|
||||
namespace: trailbase
|
||||
spec:
|
||||
selector:
|
||||
app: trailbase
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 4000
|
||||
targetPort: 4000
|
||||
@@ -1,14 +0,0 @@
|
||||
services:
|
||||
|
||||
trail:
|
||||
build: .
|
||||
ports:
|
||||
- "4000:4000"
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./traildepot:/app/traildepot
|
||||
environment:
|
||||
# Setup Rust's env-logger.
|
||||
RUST_LOG: "info,refinery_core=warn"
|
||||
RUST_BACKTRACE: "1"
|
||||
command: "/app/trail --data-dir /app/traildepot run --address 0.0.0.0:4000"
|
||||
Reference in New Issue
Block a user