File tree Expand file tree Collapse file tree 4 files changed +36
-9
lines changed
Expand file tree Collapse file tree 4 files changed +36
-9
lines changed Original file line number Diff line number Diff line change 7171 echo "=== Testing SSH Connection ==="
7272 ssh -i vockey.pem -o StrictHostKeyChecking=no ubuntu@${{ steps.terraform.outputs.public_ip }} "echo 'SSH connection successful'"
7373 echo "=== Running Ansible Playbook ==="
74- ANSIBLE_HOST_KEY_CHECKING=False ANSIBLE_DEBUG=1 ansible-playbook -i inventory.yml playbooks/deploy.yml -vvv --extra-vars "ansible_host=${{ steps.terraform.outputs.public_ip }}" --start-at-task="Test connection"
74+ ANSIBLE_HOST_KEY_CHECKING=False ANSIBLE_DEBUG=1 ansible-playbook -i inventory.yml playbooks/deploy.yml -vvv --extra-vars "ansible_host=${{ steps.terraform.outputs.public_ip }} EC2_PUBLIC_IP=${{ steps.terraform.outputs.public_ip }} " --start-at-task="Test connection"
Original file line number Diff line number Diff line change @@ -113,6 +113,34 @@ services:
113113 networks :
114114 - backend
115115
116+ match-database :
117+ image : mysql:8.0
118+ container_name : meetatmensa-matchdb
119+ environment :
120+ - MYSQL_ROOT_PASSWORD=root
121+ volumes :
122+ - matchdb_data:/var/lib/mysql
123+ expose :
124+ - " 3306"
125+ networks :
126+ - backend
127+
128+ user-database :
129+ image : mysql:8.0
130+ container_name : meetatmensa-userdb
131+ environment :
132+ - MYSQL_ROOT_PASSWORD=root
133+ volumes :
134+ - userdb_data:/var/lib/mysql
135+ expose :
136+ - " 3306"
137+ networks :
138+ - backend
139+
116140networks :
117141 backend :
118142 driver : bridge
143+
144+ volumes :
145+ matchdb_data :
146+ userdb_data :
Original file line number Diff line number Diff line change 8989 dest : " {{ deployment_dir }}/compose.aws.yml"
9090 mode : " 0644"
9191
92- - name : Create .env.prod file
92+ - name : Create .env file for Docker Compose
9393 template :
9494 src : " {{ playbook_dir }}/../templates/env.prod.j2"
95- dest : " {{ app_dir }}/.env.prod "
95+ dest : " {{ deployment_dir }}/.env"
9696 mode : " 0644"
9797
9898 - name : Start Docker Compose
104104 build : always
105105 remove_orphans : yes
106106 environment :
107- DOCKER_BUILDKIT : 1
108- EC2_PUBLIC_IP : " {{ ansible_host }}"
107+ DOCKER_BUILDKIT : 1
Original file line number Diff line number Diff line change 1- EC2_PUBLIC_IP={{ lookup('env', ' EC2_PUBLIC_IP') }}
2- CLIENT_HOST=client.{{ lookup('env', ' EC2_PUBLIC_IP') }}.nip.io
3- SERVER_HOST=api.{{ lookup('env', ' EC2_PUBLIC_IP') }}.nip.io
4- PUBLIC_API_URL=https://api.{{ lookup('env', ' EC2_PUBLIC_IP') }}.nip.io
1+ EC2_PUBLIC_IP={{ EC2_PUBLIC_IP }}
2+ CLIENT_HOST=client.{{ EC2_PUBLIC_IP }}.nip.io
3+ SERVER_HOST=api.{{ EC2_PUBLIC_IP }}.nip.io
4+ PUBLIC_API_URL=https://api.{{ EC2_PUBLIC_IP }}.nip.io
You can’t perform that action at this time.
0 commit comments