This project is a Flask application for uploading files to a server in my home. I have this application running on my raspberry pi server at my home running to upload files locally using this app.
- Clone the repository:
git clone https://github.com/shashankbhosagi/uploadfiletoserver.git
- Navigate to the project directory:
cd uploadfiletoserver
- Create and activate a virtual environment:
python3 -m venv venvUpload && source venvUpload/bin/activate
- Install the required dependencies:
pip install -r requirements.txt
- Set the
FLASK_APP
environment variable:export FLASK_APP=run.py
- Start the Flask development server:
flask run
- Open your web browser and visit
http://localhost:5000
---------------------------OR---------------------------------------------
- Build the app in docker using below command and create an image named uploadfile
sudo docker build -t uploadfile .
- Run docker container from the image on port run this command
sudo docker container run -d -p 5000:5000 uploadfile
- To Stop docker container
sudo docker container ls
sudo docker container stop <starting_letters_of_container_id>
Here in our case
sudo docker container stop cb0