Apollo Universal Starter Kit support containerization your application with Docker. Before you can run the starter kit project with Docker, install the latest versions of Docker and Docker Compose.
To run the starter kit in development mode with live code reloading, run:
docker-compose up
NOTE: it may take a couple of minutes to build and run the application with Docker Compose.
When the build is ready, visit http://localhost:3000
in your browser to view the application.
If you need to launch the dockerized project in Expo, follow the steps below:
-
Run Expo Client on your mobile device, in Android Simulator, or in Xcode.
-
Tap Explore in the Expo Client app.
-
Tap the magnifier on the top.
-
Enter the URL
exp://localhost:19000
orexp://000.00.0.0:19000
NOTE: you must use your actual IP address instead of 000.00.0.0
. The starter kit will suggest the LAN IP address
that you can use.
- Tap the pop up to open the app.
NOTE: if you want to run the app on a mobile device (either Android or iOS device), use the LAN IP address of your
development machine instead of localhost
in Expo. Scanning the QR codes won't work in this case.
To run the starter kit in production mode with Docker Compose, execute:
docker-compose -f docker-compose.prod.yml up
After that, open URL http://localhost:3000
in the browser to view the application.