forked from open-educational-badges/badgr-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.debug.yml
More file actions
74 lines (69 loc) · 2.05 KB
/
docker-compose.debug.yml
File metadata and controls
74 lines (69 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# A dockerized badgr-server stack for debugging
version: '3.3'
services:
# this container mirrors in the app code and runs the django dev server
api:
build:
context: .
dockerfile: .docker/Dockerfile.debug.api
depends_on:
- "db"
- "memcached"
command: ["sh", "-c", "python3 -m debugpy --listen 0.0.0.0:5678 /badgr_server/manage.py runserver 0.0.0.0:8000"]
volumes:
- ./apps:/badgr_server/apps
- ./manage.py:/badgr_server/manage.py
- ./.docker/etc/settings_local.dev.py:/badgr_server/apps/mainsite/settings_local.py
# The following is needed for tox to run
- ./tox.ini:/badgr_server/tox.ini
- ./setup.py:/badgr_server/setup.py
- ./README.md:/badgr_server/README.md
- ./user_emails.csv:/badgr_server/user_emails.csv
networks:
- badgr
ports:
- "8000:8000"
- "5678:5678"
# this container runs memcached
memcached:
image: 'bitnami/memcached:latest'
expose:
- "11211"
networks:
- badgr
# this container runs mysql (database)
db:
image: mysql:5.7.31
# platform: linux/amd64 comment in if you are on Apple Silicon
volumes:
- badgr_server_dev_db:/var/lib/mysql:rw
- ./.docker/etc/init.sql:/docker-entrypoint-initdb.d/init.sql
environment:
- "MYSQL_PASSWORD=password"
- "MYSQL_HOST=db"
- "MYSQL_ROOT_PASSWORD=password"
ulimits:
# Needs to be set e.g. on Fedora, Arch, etc.
# https://github.com/docker-library/mysql/issues/873#issuecomment-1909948195
# https://github.com/ddev/ddev/issues/4862#issuecomment-1533141193
nofile: # Fix memory leak issue on some systems when LimitCORE=infinity or LimitNOFILE=infinity (containerd)
soft: 1048576
hard: 1048576
expose:
- "3306"
networks:
- badgr
mailhog:
image: mailhog/mailhog
container_name: mailhog
restart: always
ports:
- "1025:1025" #127.0.0.1:1025:1025
- "8025:8025"
networks:
- badgr
networks:
badgr:
driver: bridge
volumes:
badgr_server_dev_db: