Skip to content

Commit a966ac0

Browse files
authored
Add build and start command to nginx server example (#2199)
## Summary Add build and start command to nginx server example. ## How was it tested? locally
1 parent 5822fa5 commit a966ac0

File tree

3 files changed

+196
-3
lines changed

3 files changed

+196
-3
lines changed

examples/servers/apache/.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
devbox.d/apacheHttpd/apache.pid
2-
.devbox
1+
*.log
2+
*.pid
3+
*.sock

examples/servers/nginx/devbox.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,13 @@
22
"packages": [
33
"nginx@latest"
44
],
5-
"shell": {}
5+
"env": {
6+
"NGINX_WEB_PORT": "8080"
7+
},
8+
"shell": {
9+
"scripts": {
10+
"build": "if [ -f $NGINX_CONFDIR/nginx.template ]; then envsubst $(awk 'BEGIN {for (k in ENVIRON) {printf \"$\"k\",\"}}') < $NGINX_CONFDIR/nginx.template > $NGINX_CONFDIR/nginx.conf; fi",
11+
"start": "nginx -p $NGINX_PATH_PREFIX -c $NGINX_CONFDIR/nginx.conf -e error.log -g \"pid nginx.pid;daemon off;\""
12+
}
13+
}
614
}

examples/servers/nginx/devbox.lock

Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,190 @@
11
{
22
"lockfile_version": "1",
33
"packages": {
4+
"gawk@latest": {
5+
"last_modified": "2024-07-07T07:43:47Z",
6+
"resolved": "github:NixOS/nixpkgs/b60793b86201040d9dee019a05089a9150d08b5b#gawk",
7+
"source": "devbox-search",
8+
"version": "5.2.2",
9+
"systems": {
10+
"aarch64-darwin": {
11+
"outputs": [
12+
{
13+
"name": "out",
14+
"path": "/nix/store/v91lg28v8cf7b7xwblc8l1167psarji6-gawk-5.2.2",
15+
"default": true
16+
},
17+
{
18+
"name": "man",
19+
"path": "/nix/store/n1ib25dsb3hncv1j4qnlshk7nxd9rzgy-gawk-5.2.2-man",
20+
"default": true
21+
},
22+
{
23+
"name": "info",
24+
"path": "/nix/store/4xzkvlzgfbcv4j6cfr4afab3cd55fcs7-gawk-5.2.2-info"
25+
}
26+
],
27+
"store_path": "/nix/store/v91lg28v8cf7b7xwblc8l1167psarji6-gawk-5.2.2"
28+
},
29+
"aarch64-linux": {
30+
"outputs": [
31+
{
32+
"name": "out",
33+
"path": "/nix/store/sxh7pp4ymxh6ffhkv3zikbwqsxfpfw5q-gawk-5.2.2",
34+
"default": true
35+
},
36+
{
37+
"name": "man",
38+
"path": "/nix/store/2ld628nm8lzlz04km6spbvc39k4wvqq9-gawk-5.2.2-man",
39+
"default": true
40+
},
41+
{
42+
"name": "info",
43+
"path": "/nix/store/k3c8wlnzjjj206rvviap1xicvcdzr24g-gawk-5.2.2-info"
44+
}
45+
],
46+
"store_path": "/nix/store/sxh7pp4ymxh6ffhkv3zikbwqsxfpfw5q-gawk-5.2.2"
47+
},
48+
"x86_64-darwin": {
49+
"outputs": [
50+
{
51+
"name": "out",
52+
"path": "/nix/store/d2kmk6sl98dpgkph0v6phd4rnsyx6i0d-gawk-5.2.2",
53+
"default": true
54+
},
55+
{
56+
"name": "man",
57+
"path": "/nix/store/q3l282f4i3y6w9lm0c5wzw2n9sbhzj13-gawk-5.2.2-man",
58+
"default": true
59+
},
60+
{
61+
"name": "info",
62+
"path": "/nix/store/ay7q9wlmh8z922c0bvnckyidsgb5pvr5-gawk-5.2.2-info"
63+
}
64+
],
65+
"store_path": "/nix/store/d2kmk6sl98dpgkph0v6phd4rnsyx6i0d-gawk-5.2.2"
66+
},
67+
"x86_64-linux": {
68+
"outputs": [
69+
{
70+
"name": "out",
71+
"path": "/nix/store/a5rvjq2ir4d1wnxwdf4a9zf6hfc6ydsx-gawk-5.2.2",
72+
"default": true
73+
},
74+
{
75+
"name": "man",
76+
"path": "/nix/store/qc4z5d8snivqvg8bbzj44l978m5yf87k-gawk-5.2.2-man",
77+
"default": true
78+
},
79+
{
80+
"name": "info",
81+
"path": "/nix/store/7c3352rbv7w6l0frfxrc7prmf1mnipwa-gawk-5.2.2-info"
82+
}
83+
],
84+
"store_path": "/nix/store/a5rvjq2ir4d1wnxwdf4a9zf6hfc6ydsx-gawk-5.2.2"
85+
}
86+
}
87+
},
88+
"gettext@latest": {
89+
"last_modified": "2024-07-19T07:13:34Z",
90+
"resolved": "github:NixOS/nixpkgs/af9c15bc7a314c226d7d5d85e159f7a73e8d9fae#gettext",
91+
"source": "devbox-search",
92+
"version": "0.21.1",
93+
"systems": {
94+
"aarch64-darwin": {
95+
"outputs": [
96+
{
97+
"name": "out",
98+
"path": "/nix/store/819snm2qj7gn7hnqz3vm1ysmcjckwsrf-gettext-0.21.1",
99+
"default": true
100+
},
101+
{
102+
"name": "man",
103+
"path": "/nix/store/9y80g88clvh3d9v8n12kjxbkkrn4bidq-gettext-0.21.1-man",
104+
"default": true
105+
},
106+
{
107+
"name": "info",
108+
"path": "/nix/store/59c6hqicp5r4jv5q47mkx8zcf1gkyrla-gettext-0.21.1-info"
109+
},
110+
{
111+
"name": "doc",
112+
"path": "/nix/store/sb0jc2m7mcwc0r9wwpv8jarb8rhdmvmh-gettext-0.21.1-doc"
113+
}
114+
],
115+
"store_path": "/nix/store/819snm2qj7gn7hnqz3vm1ysmcjckwsrf-gettext-0.21.1"
116+
},
117+
"aarch64-linux": {
118+
"outputs": [
119+
{
120+
"name": "out",
121+
"path": "/nix/store/j3mkmk5c9m6jvig3nfvz1wx8nglbxl9f-gettext-0.21.1",
122+
"default": true
123+
},
124+
{
125+
"name": "man",
126+
"path": "/nix/store/g6012xcn15xb60sjiai6jhcwii0178n1-gettext-0.21.1-man",
127+
"default": true
128+
},
129+
{
130+
"name": "doc",
131+
"path": "/nix/store/5pz5zv734cg2as7hpns0ay2xap330017-gettext-0.21.1-doc"
132+
},
133+
{
134+
"name": "info",
135+
"path": "/nix/store/4gnl8q17ig6sd4m5d2lxdprl7vlhc7qa-gettext-0.21.1-info"
136+
}
137+
],
138+
"store_path": "/nix/store/j3mkmk5c9m6jvig3nfvz1wx8nglbxl9f-gettext-0.21.1"
139+
},
140+
"x86_64-darwin": {
141+
"outputs": [
142+
{
143+
"name": "out",
144+
"path": "/nix/store/g5zy6410a9fr9lbc3labdy7p9p5l23g6-gettext-0.21.1",
145+
"default": true
146+
},
147+
{
148+
"name": "man",
149+
"path": "/nix/store/q14lzqxl3kwdkd6a88kl08la9q26klmm-gettext-0.21.1-man",
150+
"default": true
151+
},
152+
{
153+
"name": "doc",
154+
"path": "/nix/store/5c2rgck685hvfynhjmgw9m7vl4c8vxc9-gettext-0.21.1-doc"
155+
},
156+
{
157+
"name": "info",
158+
"path": "/nix/store/cqf10m7jzrg16fhk2gcc8b22i3s0qfsn-gettext-0.21.1-info"
159+
}
160+
],
161+
"store_path": "/nix/store/g5zy6410a9fr9lbc3labdy7p9p5l23g6-gettext-0.21.1"
162+
},
163+
"x86_64-linux": {
164+
"outputs": [
165+
{
166+
"name": "out",
167+
"path": "/nix/store/kpicyzzxir2hr4j4ng94wywlsraz4k8p-gettext-0.21.1",
168+
"default": true
169+
},
170+
{
171+
"name": "man",
172+
"path": "/nix/store/pxwsy2smar83fccl7bxyqlx6qgpfagjv-gettext-0.21.1-man",
173+
"default": true
174+
},
175+
{
176+
"name": "doc",
177+
"path": "/nix/store/vxy8nsnnkjwwr80x4dpcnwqapidpz7dq-gettext-0.21.1-doc"
178+
},
179+
{
180+
"name": "info",
181+
"path": "/nix/store/2h0kw9gl87h12aps7s1qkmcrxkwh7905-gettext-0.21.1-info"
182+
}
183+
],
184+
"store_path": "/nix/store/kpicyzzxir2hr4j4ng94wywlsraz4k8p-gettext-0.21.1"
185+
}
186+
}
187+
},
4188
"nginx@latest": {
5189
"last_modified": "2024-02-10T18:15:24Z",
6190
"plugin_version": "0.0.4",

0 commit comments

Comments
 (0)