-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcloud-init-test-websites.cfg
71 lines (59 loc) · 1.59 KB
/
cloud-init-test-websites.cfg
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
#cloud-config
cloud_final_modules:
- [scripts-per-once, once-per-instance]
- [scripts-per-instance, once-per-instance]
- scripts-per-boot
write_files:
- content: |
#!/bin/sh
echo Script per once run!!
owner: root:root
path: /var/lib/cloud/scripts/per-once/script.sh
- content: |
#!/bin/sh
echo Script per instance run!
# install git
yum install git -y
cd /home/ec2-user/
docker compose up --detach
owner: root:root
path: /var/lib/cloud/scripts/per-instance/create-image.sh
permissions: '0764'
- content: |
#!/bin/sh
echo Script per boot run!
owner: root:root
path: /var/lib/cloud/scripts/per-boot/script.sh
permissions: '0764'
- content: |
version: '3'
services:
test-websites:
build:
context: https://github.com/Jarek-Rolski/test-websites.git
image: test-websites
container_name: test-websites
restart: always
ports:
- 81:8080
- 82:7860
environment:
BUCKET: ***
AWS_DEFAULT_REGION: ***
LUNCH: true
GRADIO: true
healthcheck:
test: curl --fail http://localhost:8080/lunch && curl --fail http://localhost:7860/ || exit 1
interval: 60s
retries: 5
start_period: 20s
timeout: 10s
logging:
driver: awslogs
options:
awslogs-region: ***
awslogs-group: ***
awslogs-create-group: 'true'
owner: root:root
path: /home/ec2-user/docker-compose.yml
permissions: '0764'