-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from Cleanwalk-org-QNSCNT/dev
Now using a trunk based development workflow so merge of dev into main
- Loading branch information
Showing
134 changed files
with
4,434 additions
and
6,969 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.vscode | ||
.idea | ||
.DS_Store | ||
|
||
node_modules | ||
npm-debug.log | ||
|
||
.venv | ||
*.pyc | ||
__pycache__/ | ||
|
||
Dockerfile | ||
.dockerignore | ||
|
||
.git | ||
.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Cleanwalk V2 website and webapp | ||
|
||
Cleanwalk.org is a website to find clean walks all over France. | ||
|
||
## Table of Contents | ||
|
||
- **[Frontend](front/README.md)** | ||
- **[API](api/README.md)** | ||
|
||
## Requirements | ||
|
||
You only need Docker to launch the app. | ||
|
||
### Linux | ||
|
||
- [Docker Engine installation steps](https://docs.docker.com/engine/install/debian/#install-using-the-repository) | ||
- [Docker Desktop (DEB package)](https://desktop.docker.com/linux/main/amd64/docker-desktop-4.26.1-amd64.deb?utm_source=docker&utm_medium=webreferral&utm_campaign=docs-driven-download-linux-amd64) (optional) | ||
|
||
### macOS | ||
|
||
- [Apple Silicon package](https://desktop.docker.com/mac/main/arm64/Docker.dmg?utm_source=docker&utm_medium=webreferral&utm_campaign=docs-driven-download-mac-arm64) | ||
- [Intel Chip package](https://desktop.docker.com/mac/main/amd64/Docker.dmg?utm_source=docker&utm_medium=webreferral&utm_campaign=docs-driven-download-mac-amd64) | ||
|
||
### Windows | ||
|
||
- [Windows Installer](https://desktop.docker.com/win/main/amd64/Docker%20Desktop%20Installer.exe) | ||
|
||
## How to launch | ||
|
||
Copy the `stash.env.example` file to `stash.env` and fill the required fields, same with `api/.env.example` to `api/.env`. | ||
|
||
### Developement | ||
|
||
To launch the app on dev environnement, use the docker compose tool at the root directory of the project. | ||
|
||
Dev script: | ||
|
||
```bash | ||
./scripts/compose-dev.sh | ||
``` | ||
|
||
Direct command to not use the dev compose file: | ||
|
||
```bash | ||
docker compose up -d | ||
``` | ||
|
||
To shutdown all stack or just a specific one: | ||
|
||
```bash | ||
docker compose down | ||
``` | ||
|
||
### Production | ||
|
||
Use Portainer for easier management. To install it, launch the script named "install-portainer.sh" and to access it you can check the service on port 9000. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
DATABASE_URI=mysql+mysqlconnector://root:root@localhost:3306/cleanwalk_db | ||
API_KEY=1234567890 | ||
JWT_SECRET_KEY=098765433 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,23 @@ | ||
FROM python:3-alpine | ||
|
||
WORKDIR /usr/src/api | ||
RUN addgroup -S flask && adduser -S flask -G flask | ||
|
||
COPY requirements.txt . | ||
RUN mkdir -p /home/flask/app && chown -R flask:flask /home/flask/app | ||
|
||
RUN pip install --no-cache-dir -r requirements.txt | ||
WORKDIR /home/flask/app | ||
|
||
COPY . . | ||
COPY requirements*.txt ./ | ||
|
||
USER flask | ||
|
||
RUN --mount=type=cache,target=/root/.cache/pip \ | ||
pip3 install --upgrade pip && \ | ||
pip3 install -r requirements.txt | ||
|
||
COPY --chown=flask:flask . . | ||
|
||
EXPOSE 5000 | ||
|
||
CMD [ "python", "./app.py" ] | ||
ENTRYPOINT [ "python" ] | ||
|
||
CMD [ "app.py" ] |
Oops, something went wrong.