Skip to content

Commit

Permalink
ansible readme
Browse files Browse the repository at this point in the history
  • Loading branch information
massteff committed Jan 23, 2024
1 parent cbdd26a commit c72a15c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
1 change: 0 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

## API documentation

API documentation can be found in the `API.md` file or at the following URL: https://api.dai.heig.lutonite.dev/
API documentation can be found in the `API.md` file or at the following URL: https://api.dai.heig.lutonite.dev/

## Dependencies

Expand Down Expand Up @@ -77,3 +77,21 @@ java -jar target/pw-api-1.0.0-SNAPSHOT.jar server
The application is deployed by connecting to the server using SSH and pulling from the git repository.

Upon pulling the repository, the docker image must be rebuilt and run once again.

If you want to set up a virtual machine, install all the dependencies, and automatically launch the application,
you can use Ansible from this repository and execute the following command:

Yo must have `Ansible` (2.10.8) and `Python` (3.10.4) installed on your machine.

```shell
ansible-playbook -i ./ansible/hosts ./ansible/playbook.yml -kK
```

Docker, Docker composes and the other dependencies will be installed, the authorized_keys will be copied and the
application will be launched.

Note: `-k` will ask you for the password of the user you want to connect to the VM with. `-K` will ask you for the
password of the sudo user (can be the same as the previous one). If you have a ssh key already set up, you can remove it.

You also need to change the IP address of the VM in the `ansible/hosts` file.

0 comments on commit c72a15c

Please sign in to comment.