-
-
Notifications
You must be signed in to change notification settings - Fork 47
/
Statefile.yml
159 lines (151 loc) · 4.02 KB
/
Statefile.yml
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
## Statefile used for development and testing purposes
## We moved away from the classic docker compose setup
## Because we needed to have a more flexible config to enable multi node testing
ApiVersion: v0.14
Namespace: system
Cargoes:
- Name: nstore
Container:
Hostname: store.nanocl.internal
Image: cockroachdb/cockroach:v24.2.4
Entrypoint:
- /bin/sh
Tty: true
Env:
- STATE_DIR=${{ state_dir }}/store
HostConfig:
PortBindings:
26257/tcp:
- HostPort: "26257"
HostIp: "0.0.0.0"
26258/tcp:
- HostPort: "26258"
HostIp: "0.0.0.0"
Binds:
- ${{ state_dir }}/store:${{ state_dir }}/store
Cmd:
- -c
- |
echo "starting cockroachdb"
cockroach start-single-node --insecure --store=$STATE_DIR/data
- Name: nmetrics
Container:
Image: ghcr.io/next-hat/metrsd:0.5.4
Tty: true
Env: [LOG_LEVEL=metrsd=info]
Cmd:
- --hosts
- unix:///run/nanocl/metrics.sock
HostConfig:
Binds:
- //run/guest-services/nanocl:/run/nanocl
- Name: nproxy
Container:
Image: nproxy:dev
Tty: true
Env:
- STATE_DIR=${{ state_dir }}/proxy
HostConfig:
NetworkMode: host
Binds:
- //run/guest-services/nanocl:/run/nanocl
- ${{ state_dir }}/proxy:/${{ state_dir }}/proxy
- Name: ncproxy
Container:
Image: ghcr.io/next-hat/nanocl-dev:dev
Tty: true
ExposedPorts:
8686/tcp:
HostConfig:
PortBindings:
8686/tcp:
- HostPort: "8686"
HostIp: "0.0.0.0"
Binds:
- ./:/project
- nanocl-deps:/project/target
- rust-cache:/usr/local/cargo/registry
- ${{ state_dir }}/proxy:/${{ state_dir }}/proxy
- //run/guest-services/nanocl:/run/nanocl
Cmd:
- watch
- -w
- /project/bin/ncproxy/src
- -x
- run --no-default-features --features dev --bin ncproxy -- --state-dir ${{ state_dir }}/proxy
- Name: ndns
Container:
Image: ndns:dev
Tty: true
Env:
- STATE_DIR=${{ state_dir }}/dns
HostConfig:
NetworkMode: host
Binds:
- ${{ state_dir }}/dns:/${{ state_dir }}/dns
- Name: ncdns
Container:
Image: ghcr.io/next-hat/nanocl-dev:dev
Tty: true
ExposedPorts:
8787/tcp:
HostConfig:
PortBindings:
8787/tcp:
- HostPort: "8787"
Binds:
- ./:/project
- nanocl-deps:/project/target
- rust-cache:/usr/local/cargo/registry
- ${{ state_dir }}/dns:/${{ state_dir }}/dns
- //run/guest-services/nanocl:/run/nanocl
Cmd:
- watch
- -w
- /project/bin/ncdns/src
- -x
- run --no-default-features --features dev --bin ncdns -- --state-dir ${{ state_dir }}/dns
- Name: ndaemon
Container:
Image: ghcr.io/next-hat/nanocl-dev:dev
Tty: true
Hostname: nanocl.internal
Cmd:
- watch
- -w
- /project/bin/nanocld/src
- -x
- |
run --no-default-features \
--features dev \
--bin nanocld \
-- \
--hosts unix:///run/nanocl/nanocl.sock \
--gid 1001 \
--hosts tcp://0.0.0.0:9443 \
--cert ./tests/server.crt \
--cert-key ./tests/server.key \
--gateway ${{ gateway }} \
--hostname ${{ hostname }} \
--advertise-addr ${{ advertise_addr }}:8585 \
--cert-ca ./tests/ca.crt \
--state-dir ${{ state_dir }} \
--store-addr postgresql://root:[email protected]:26257/defaultdb
ExposedPorts:
8585/tcp:
9443/tcp:
HostConfig:
PortBindings:
8585/tcp:
- HostPort: "8585"
HostIp: "0.0.0.0"
9443/tcp:
- HostPort: "9443"
HostIp: "0.0.0.0"
Binds:
- ./:/project
- nanocl-deps:/project/target
- rust-cache:/usr/local/cargo/registry
- //run/guest-services/nanocl:/run/nanocl
- ${{ state_dir }}:/${{ state_dir }}
- /var/run/docker.sock:/run/docker.sock