Notice: This does not server a real purpose in my opinion. I wanted to learn how to use Flask and Docker and how to publish a docker image on Github Container Registry.
Feel free to contribute to this project if you think this can be useful for someone else.
This repository provides a Flask application for interacting with JSON data through a web interface.
Make sure you have Docker and Docker Compose installed on your machine. You can download and install Docker from Docker's official website.
To get started, follow these steps:
-
Clone the Repository:
git clone https://github.com/emmpaul/json-route-app.git cd json-route-app
-
Start the Application with Docker Compose:
docker-compose up -d
This command will start the Flask application in detached mode.
- Point your domain to the server:
Ensure your domain is pointed to the server where the Flask application is running, and the server is accessible on the port you specified in the .env
file. By default, the application is running on port 5000.
- Access the application:
Open your web browser and navigate to:
http://your-domain-or-ip:5000
Note: Replace
your-domain-or-ip
with your actual domain or IP address. If you changed the port, replace5000
with the appropriate port number.
- Enter valid JSON:
Once you access the application, you will be prompted to enter valid JSON data. Input your JSON and interact with the application as needed.
If you want to run the application locally, you can use Docker Compose to build and run the application in a container.
-
Start the Application with Docker Compose:
docker-compose -f docker-compose.local.yml up -d --build
Note: This command will build the Docker image and start the application in detached mode. The FLASK_PORT can still be changed in the .env file. By default, the application is running on port 5000.
- Visit the application at
http://your-domain-or-ip:5000
. - Enter your JSON data into the provided input field.
- Submit and view the results.
- If the application does not start: Ensure Docker and Docker Compose are correctly installed and running.
- If you encounter issues: Check the logs using
docker-compose logs
for more details.
This project is licensed under the MIT License.