WMGZON/README.md

64 lines
1.3 KiB
Markdown
Raw Normal View History

---
runme:
id: 01HK0BF4BTBSKR9VWAP1KGD2S7
version: v2.0
---
# WMGZON
`Flask web application serving WMGZON and its relevant backend services.`
## Initialisation
To start you need to create a virtual environment and load in the required dependencies for the project
```sh {"closeTerminalOnSuccess":"false","id":"01HK0BJCK9BR05J127F1X0RZP9"}
python -m venv .venv
./.venv/Scripts/Activate.ps1
pip install -r requirements.txt
```
## Testing
To run the full suite of unit tests for the webapp simply run the following command in the venv
```sh
pytest
```
## Running
### Pre-Requisites
- Docker daemon is installed and running.
- Docker compose is installed.
### Instructions
In order to run the web app, simply use the command
```sh {"id":"01HKD0VRADDYQ92W22JN1FHA03"}
docker-compose up -d
```
to run the container in a detatched mode.
### Container
Alternatively, to deploy the app from the lastest published container:
```yml
version: '3.8'
services:
wmgzon:
container_name: "wmgzon"
image: lukeelse/wmgzon:latest
environment:
- FILESTORE=static/assets/img/products/
tty: true
ports:
- "8080:8080"
volumes:
- ./files:/app/$FILESTORE
restart: unless-stopped
```