Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions deployment/community/docker-compose.debug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@


services:
server:
image: server
build:
context: ../../server
dockerfile: Dockerfile
env_file:
- .prod.env
- .dev.env
environment:
- FLASK_ENV=development
- FLASK_DEBUG=1
- GEVENT_SUPPORT=1
command: ["pip install debugpy -t /tmp && python3 /tmp/debugpy --wait-for-client --listen 0.0.0.0:5678 -m flask run -h 0.0.0.0 -p 5000"]
ports:
- 5000:5000
- 5678:5678
volumes:
- ../../server/:/app
celery-beat:
image: celery-beat
build:
context: ../../server
dockerfile: Dockerfile
env_file:
- .prod.env
- .dev.env
celery-worker:
image: celery-worker
build:
context: ../../server
dockerfile: Dockerfile
env_file:
- .prod.env
- .dev.env
web:
image: merginmaps-frontend
build:
context: ../../web-app
dockerfile: Dockerfile
maildev:
image: maildev/maildev
container_name: merginmaps-maildev
restart: always
ports:
- 1080:1080
- 1025:1025
networks:
- merginmaps
9 changes: 9 additions & 0 deletions development.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ If you want to run the whole stack locally, you can use the docker. Docker will
cd deployment/community/

# Run the docker composition with the current Dockerfiles
cp .env.template .prod.env
docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d

# Give ownership of the ./projects folder to user that is running the gunicorn container
Expand All @@ -94,6 +95,14 @@ docker exec -it merginmaps-server flask server send-check-email --email admin@e

In docker-compose.dev.yml is started maildev/maildev image that can be used to test emails (see [https://github.com/maildev/maildev/](https://github.com/maildev/maildev/)). In localhost:1080 you can see the emails sent by the application in web interface.

### Running with remote debugger
If you want to run the application with remote debugger, you can use debug compose file with attatched source code and reload.
It starts a debugpy session on port 5678 you cat attach to.

```shell
docker compose -f docker-compose.yml -f docker-compose.debug.yml up
```

## Running tests
To launch the unit tests run:
```shell
Expand Down
Loading