-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ab4a29e
commit 4056dcf
Showing
1 changed file
with
9 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
# Containerized All United Automation | ||
This is a simple script that uses selenium to access data from All United for further automation. | ||
This is a simple API that uses selenium to access data from All United for further automation. | ||
It acts as an user because thats the only way to access the data. | ||
All united does not have an API and uses PHP sessions. | ||
|
||
## Selenium | ||
Selenium is a tool that allows you to automate browser actions. | ||
It is used in this project to access the data from All United. | ||
|
||
## Get started | ||
Be sure to have an env file with the properties visible in `env.example`. | ||
After that be sure to `npm install` the packages. | ||
- Create a `.env` file with the properties visible in `env.example`. | ||
- Run `npm install` to install the packages. | ||
- Run `docker compose up` to start the container. | ||
|
||
### Run | ||
```npm run start``` to run the script which is always headless (No browser).<br> | ||
If you want to run it with a visible browser comment the headless option ```.addArguments("--headless") // Comment when testing locally``` | ||
inside `index.ts`. | ||
## Cron | ||
The cron is used to call the /synchronisation endpoint every day at midnight. <br> | ||
The /health route can be used to check the health status of the API. | ||
|
||
### Build | ||
## Build | ||
For local use ```npm run build``` to build the project.<br> | ||
For docker use: <br> | ||
```docker build -t vslcatena/synchronisation-api -f Dockerfile.prod .``` |