File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -166,3 +166,9 @@ cython_debug/
166166/report.html
167167/.idea /
168168/assets /
169+ /.terraform.lock.hcl
170+ /terraform.tfstate
171+ /terraform-pem-ansible-dec04.pem
172+ /.terraform /providers /registry.terraform.io /hashicorp /aws /4.67.0 /darwin_arm64 /terraform-provider-aws_v4.67.0_x5
173+ /.terraform /providers /registry.terraform.io /hashicorp /local /2.4.1 /darwin_arm64 /terraform-provider-local_v2.4.1_x5
174+ /.terraform /providers /registry.terraform.io /hashicorp /tls /4.0.5 /darwin_arm64 /terraform-provider-tls_v4.0.5_x5
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ services:
2525 - DB_HOST=db
2626 - DB_NAME=postgres
2727 ports :
28- - 127 .0.0.1 :8080:80
28+ - 0 .0.0.0 :8080:80
2929
3030volumes :
3131 cache :
Original file line number Diff line number Diff line change @@ -183,13 +183,26 @@ resource "aws_instance" "terraform_instance_master" {
183183 #!/bin/bash
184184 sudo apt update -y
185185 sudo apt-get install ec2-instance-connect wget -y
186+ sudo apt-get install ca-certificates curl -y
187+ sudo apt-get update
186188 sudo apt-get install ca-certificates curl
187189 sudo install -m 0755 -d /etc/apt/keyrings
188190 sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
189191 sudo chmod a+r /etc/apt/keyrings/docker.asc
192+
193+ # Add the repository to Apt sources:
194+ echo \
195+ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
196+ $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
197+ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
198+ sudo apt-get update
199+
200+
201+
190202 sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin git -y
203+ sudo service docker start
191204 wget https://raw.githubusercontent.com/maxiplux/api-python-project-devops-fast-api/dev-auth/docker-compose.yml
192- sudo docker- compose up -d
205+ sudo docker compose up -d
193206
194207
195208
@@ -210,7 +223,7 @@ output "server_private_ip" {
210223}
211224
212225output "server_public_dns" {
213- value = [ aws_instance . terraform_instance_master . public_dns ]
226+ value = " http:// ${ aws_instance . terraform_instance_master . public_dns } :8080/docs "
214227}
215228
216229output "server_public_ipv4" {
You can’t perform that action at this time.
0 commit comments