fix cloud_init
This commit is contained in:
parent
d1b81ccdad
commit
2df52fdea7
@ -1,14 +1,19 @@
|
|||||||
#cloud-config
|
#cloud-config
|
||||||
|
|
||||||
|
# lista podstawowych pakietów, które należy zainstalować
|
||||||
packages:
|
packages:
|
||||||
- apt-transport-https
|
- apt-transport-https
|
||||||
- ca-certificates
|
- ca-certificates
|
||||||
- curl
|
- curl
|
||||||
- gnupg-agent
|
- gnupg-agent
|
||||||
- software-properties-common
|
- software-properties-common
|
||||||
|
|
||||||
|
# tworzymy plik docker-compose.yml
|
||||||
write_files:
|
write_files:
|
||||||
- path: /root/docker-compose.yml
|
- path: /root/docker-compose.yml
|
||||||
content: |
|
content: |
|
||||||
version: '3.9'
|
version: '3.9'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
db:
|
db:
|
||||||
image: mysql:5.7
|
image: mysql:5.7
|
||||||
@ -22,14 +27,17 @@ write_files:
|
|||||||
MYSQL_PASSWORD: gitea
|
MYSQL_PASSWORD: gitea
|
||||||
volumes:
|
volumes:
|
||||||
- db_data:/var/lib/mysql
|
- db_data:/var/lib/mysql
|
||||||
|
|
||||||
phpmyadmin:
|
phpmyadmin:
|
||||||
image: phpmyadmin
|
image: phpmyadmin
|
||||||
restart: always
|
restart: always
|
||||||
|
# przekierowanie portów zostawione tylko dla przykładu, nie należy tak robić na produkcji
|
||||||
ports:
|
ports:
|
||||||
- "8080:80"
|
- "8080:80"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
db_data: {}
|
db_data: {}
|
||||||
|
|
||||||
|
# instalujemy docker, docker-compose a następnie uruchamiamy naszą bazę danych
|
||||||
runcmd:
|
runcmd:
|
||||||
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
|
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
|
||||||
- add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
|
- add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
|
||||||
|
Loading…
Reference in New Issue
Block a user