This is a Flask web application featuring three games: Ice Cream (Eskrim), Bubbles (Gelembung), and Board (Papan).
- Docker installed on your system
- Docker Compose installed on your system
- Docker Desktop must be running (for Windows/Mac users)
Note: Before running any Docker commands, make sure Docker Desktop is started. You can verify Docker is running by executing:
docker --version
-
Build and run the application:
docker-compose up --build
-
Access the application: Open your browser and navigate to:
http://localhost:5000 -
Stop the application:
docker-compose down
-
Build the Docker image:
docker build -t flask-game-app . -
Run the container:
docker run -d -p 5000:5000 --name flask-game-app flask-game-app
-
Access the application: Open your browser and navigate to:
http://localhost:5000 -
Stop and remove the container:
docker stop flask-game-app docker rm flask-game-app
/- Main menu page/eskrim-game- Ice cream game/gelembung-game- Bubble game/papan-game- Board game
To enable hot-reload for development, uncomment the volume mounts in docker-compose.yml:
volumes:
- ./app.py:/app/app.py
- ./static:/app/static
- ./templates:/app/templatesThen restart the container:
docker-compose down
docker-compose updocker psdocker-compose logs -fdocker-compose up --builddocker-compose down --rmi all.
├── app.py # Main Flask application
├── requirements.txt # Python dependencies
├── Dockerfile # Docker image configuration
├── docker-compose.yml # Docker Compose configuration
├── .dockerignore # Files to exclude from Docker build
├── static/ # Static assets (images, fonts)
│ ├── eskrim_img/
│ ├── gelembung_img/
│ ├── papan_img/
│ ├── img/
│ └── font/
└── templates/ # HTML templates
├── menu.html
├── eskrim.html
├── gelembung.html
└── papan.html
The games (especially Gelembung/Bubble game) require camera access for hand tracking using MediaPipe. Modern browsers have security restrictions:
- Localhost Access: Camera works on
http://localhost:5000orhttp://127.0.0.1:5000 - Remote Access: Requires HTTPS with valid SSL certificate
- HTTP Remote Access: Browsers block camera access over HTTP on remote IPs for security reasons
If you see "No navigator.mediaDevices.getUserMedia exists" error when accessing via remote IP (e.g., http://46.250.233.166:5000), you need to either:
- Access via localhost if testing locally
- Set up HTTPS with SSL certificates for production deployment
- Use a reverse proxy like Nginx with SSL/TLS
If port 5000 is already in use, you can change it in docker-compose.yml:
ports:
- "8080:5000" # Change 8080 to any available portCheck the logs:
docker-compose logsdocker-compose down
docker-compose build --no-cache
docker-compose up