-
Notifications
You must be signed in to change notification settings - Fork 5
/
Taskfile.docker.yml
51 lines (45 loc) · 1.45 KB
/
Taskfile.docker.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
version: "3"
# Create a dotenv .env file in the root folder
# to override the default values defined in .env.default
dotenv: [.env, .env.default]
includes:
common:
taskfile: Taskfile.common.yml
flatten: true
tasks:
get-certs:
desc: Get the SSL certificates from Let's Encrypt
cmds:
- >
certbot
--preferred-chain="ISRG Root X1"
certonly
--standalone -n --agree-tos --key-type rsa --email {{.CERTBOT_EMAIL}} -d {{.CERTBOT_DOMAIN}}
- task: append-root-cert
start-webserver:
internal: true
desc: Start the NGINX web server
cmds:
- nginx -c /app/nginx.conf
stop-webserver:
internal: true
desc: Stop the NGINX web server
cmds:
- nginx -c /app/nginx.conf -s stop
build-credential-server-image:
desc: Build an image that serves the Gaia-X Self-Descriptions and refreshes the compliance proofs on startup
cmds:
- apt remove --purge -y nginx task
- rm -rf /etc/nginx /var/lib/nginx /var/log/nginx /app/node_modules
- cp -a /app /server
- >-
executor -c /server
--dockerfile /server/Dockerfile.server
--no-push
--destination {{.CREDENTIAL_SERVER_IMAGE_NAME}}
--tar-path /out/image.tar
- |
printf 'Load the container with:\n\n'
printf 'docker load -i image.tar\n\n'
printf 'And run it with:\n\n'
printf 'docker run -it --rm -p 443:443 {{.CREDENTIAL_SERVER_IMAGE_NAME}}'