-
Notifications
You must be signed in to change notification settings - Fork 1
/
rockcraft.yaml
67 lines (62 loc) · 1.62 KB
/
rockcraft.yaml
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
name: nginx
version: "1.23.3"
build-base: ubuntu:22.04
base: ubuntu:22.04
summary: nginx web server
description: nginx [engine x] is an HTTP and reverse proxy server, a mail proxy server, and a generic TCP/UDP proxy server.
license: Apache-2.0
platforms:
amd64:
services:
nginx:
override: replace
command: nginx -g 'daemon off;'
startup: enabled
parts:
nginx-user:
plugin: nil
overlay-script: |
set -x
chroot $CRAFT_OVERLAY
useradd -M -U -r nginx
nginx:
plugin: autotools
after:
- nginx-user
source: https://nginx.org/download/nginx-1.23.3.tar.gz
build-packages:
- libgd-dev
- libpcre3-dev
- libssl-dev
- zlib1g-dev
stage-packages:
- ca-certificates_data
autotools-configure-parameters:
- --prefix=/usr/share/nginx
- --user=nginx
- --sbin-path=/usr/sbin/nginx
- --conf-path=/etc/nginx/nginx.conf
- --http-log-path=/var/log/nginx/access.log
- --error-log-path=/var/log/nginx/error.log
- --with-pcre
- --lock-path=/var/lock/nginx.lock
- --pid-path=/var/run/nginx.pid
- --with-http_ssl_module
- --with-http_image_filter_module=dynamic
- --modules-path=/etc/nginx/modules
- --with-http_v2_module
- --with-stream=dynamic
- --with-http_addition_module
- --with-http_mp4_module
override-build: |
set -x
craftctl default
rm $CRAFT_PART_INSTALL/etc/nginx/nginx.conf
config:
plugin: dump
after:
- nginx
source: files
organize:
nginx.conf: etc/nginx/nginx.conf
default.conf: etc/nginx/conf.d/default.conf