.. | ||
Web | ||
docker-compose.yaml | ||
README.md |
Welcome in my Readme file!
- Deployment requirements:
- Have a Linux OS
- Have Docker and Docker Compose
-
Application overview : This is an app using Flash and it's connected to a PostgreSQL database. The only thing that the app do is show a little text in a web page.
-
Virtual networks and named volumes used
- Virtual network: my app uses a Docker network who makes the communication between web app and the database possible.
- Named volume: I have one persistent volume "postgres_data" for store the database files so I have the data when the cainer is restarted.
- Container configuration : It uses 2 containers:
- The web container (Flash): the exposes port is 5000, and I use my_app_network as network.
- The database container (PostgreSQL): there are 3 environment variables (user, password and database); a persistent volume (postgres_data) and it uses my_app_network as network.
- Instructions for the deployment :
-
First, you need to clone the repository and go on the project directory
-
Second, you need to start the files with Docker-compose (docker-compose up -d --build) It's now running!
-
For stopping the app but without losing the data, you need to do (docker-compose down)
-
If you want to remove everyhting, add -v at the end (docker-composr down -v)
- Instructions for accessing the app :
- Go to http://localhost:5000 so see the page
- And we can see that the database is connected if we go to :http://localhost:5000/db-test
Thanks for reading!