Initial Set Up:
Ensure that Docker, Docker Compose and Android Studio is install in the local machine
*Note: Docker compose is automatically installed when installing Docker Desktop.
Before starting docker compose
- Free up local ports 8080, 5000, 3000, 3001, 3306
- 3306 is usually used by MySQL server
- Stopping MySQL server on Linux and Windows
- Stopping MySQL server on MacOS or you may stop MySQL through (System Preference -> MySQL -> Stop MySQL Server)
Running procedure for Windows, MacOS (Intel/M1) & Linux (Ubuntu) are the same. Using Terminal, enter ADBackend file direction. Ensure that docker-compose.yml file is in the directory. You may use command 'ls' to verify.
ls
docker compose up
docker ps -a
docker compose down
-or-
You may stop the docker compose through docker desktop. (Force stop: ^c)
*Note: DO NOT include '-' in docker compose cmd (i.e. docker-compose up). Running with hypen will generate '_' in container name which makes url invalid.
- Open GetFitWithHenry android with Android Studio, we recommend to use API 29 for the emulated android device.
- Nagivate to Constants.java file (App/Java/model/Constants.java) and update the ip address.
public class Constants {
public static String javaURL = "${host}:8080";
public static String reactURL = "${host}:3000/android";
}
Parameter | Type | Description |
---|---|---|
host |
string |
Your machine's IPv4 address. |
- Run android application.
In your browser, enter your host ip with the stated port number. (e.g. 192.XX.XX.X:3000)
- To access user react application:
${host}:3000
- To access admin react application:
${host}:3001
Parameter | Type | Description |
---|---|---|
host |
string |
Your machine's IPv4 address. |