-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathctrl.yaml.example
More file actions
85 lines (76 loc) · 2.05 KB
/
ctrl.yaml.example
File metadata and controls
85 lines (76 loc) · 2.05 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# ctrl.yaml — platform operations configuration
# Reference: https://github.com/bitboyro/ctrl
# Rename this file to ctrl.yaml. Secrets stay in .local/ctrl.local.yaml (gitignored).
# Run 'ctrl check' after filling in your values.
ctrl:
version: "0.0.1"
meta:
project: my-platform
registry: docker.io/myorg
env_files:
- .env
# - .local/secret.env
machines:
default: prod-vm
hosts:
- name: prod-vm
host: "${VM_HOST}" # resolved from env at runtime — never hardcode
user: root
port: 22
# cwd: /root # optional interactive SSH start dir for `ctrl ssh prod-vm`
# key: "${SSH_KEY}" # optional path to private key
services:
- name: my-api
description: "Backend API service"
image: docker.io/myorg/my-api
tag: latest
build:
tool: maven # maven | gradle | npm | make | shell | skip
dir: ../my-api
# args: "-pl my-module -am"
# prerequisites:
# - ../shared-lib
deploy:
compose_service: my-api
# depends_on:
# - postgres
health:
port: 8080 # or: url: https://...
smoke_tests:
- smoke-api
- name: my-web
description: "Frontend (Next.js)"
image: docker.io/myorg/my-web
tag: latest
build:
tool: npm
dir: ../my-web
deploy:
compose_service: my-web
# External service — third-party image, no build/push
# - name: grafana
# kind: external
# image: grafana/grafana
# tag: "10.2.0"
# deploy:
# compose_service: grafana
# health:
# port: 3000
scripts:
- name: smoke-api
path: scripts/smoke-api.sh
description: "Quick API smoke test after deploy"
deployments:
default: prod
targets:
- name: prod
machine: prod-vm
compose_path: /opt/my-platform/docker-compose.yml
# cwd: /opt/my-platform # optional interactive SSH start dir override for `ctrl ssh prod`
sync:
paths:
- deploy/docker-compose.yml
- deploy/traefik
- deploy/prometheus
- deploy/.env
extensions: []