These are some guides for various use.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
905 B

7 months ago
7 months ago
7 months ago
7 months ago
  1. # Flask
  2. ## Setup Server
  3. ### Docker
  4. The original container and documentation are made by [tiynger](https://hub.docker.com/r/tiynger/pythonflask).
  5. #### Volumes
  6. Set the following volumes with the -v tag.
  7. | Volume-Name | Container mount | Description |
  8. | ----------- | --------------- | ------------------------------- |
  9. | app | /flask | directory for flask application |
  10. #### Ports
  11. Set the following volumes with the -p tag.
  12. | Container-Port | Recommed outside port | Protocol | Description |
  13. | -------------- | --------------------- | -------- | ----------- |
  14. | 5000 | 80 | TCP | HTTP port |
  15. #### Rebuild
  16. ```
  17. #!/bin/sh
  18. docker stop python-flask
  19. docker rm python-flask
  20. docker pull tiynger/pythonflask:latest
  21. docker run --name python-flask \
  22. --restart unless-stopped \
  23. -p "5000:5000" \
  24. -v python-flask:/flask \
  25. -d tiynger/pythonflask:latest
  26. ```