2024-02-28 21:17:09 +08:00
|
|
|
name: monkeytype
|
|
|
|
version: "3.8"
|
|
|
|
services:
|
|
|
|
redis:
|
|
|
|
container_name: monkeytype-redis
|
|
|
|
image: redis:6.2.6
|
|
|
|
restart: on-failure
|
|
|
|
ports:
|
2024-03-04 23:10:22 +08:00
|
|
|
- "${DOCKER_REDIS_PORT:-6379}:6379"
|
2024-02-28 21:17:09 +08:00
|
|
|
volumes:
|
|
|
|
- redis-data:/data
|
|
|
|
|
|
|
|
mongodb:
|
|
|
|
container_name: monkeytype-mongodb
|
|
|
|
image: mongo:5.0.8
|
|
|
|
restart: on-failure
|
|
|
|
ports:
|
2024-03-04 23:10:22 +08:00
|
|
|
- "${DOCKER_DB_PORT:-27017}:27017"
|
2024-02-28 21:17:09 +08:00
|
|
|
volumes:
|
|
|
|
- mongo-data:/data/db
|
|
|
|
|
|
|
|
api-server:
|
|
|
|
container_name: monkeytype-api-server
|
|
|
|
image: node:18.19.1
|
|
|
|
restart: on-failure
|
|
|
|
depends_on:
|
|
|
|
- redis
|
|
|
|
- mongodb
|
|
|
|
environment:
|
|
|
|
- DB_URI=mongodb://mongodb:27017
|
|
|
|
- REDIS_URI=redis://redis:6379
|
|
|
|
ports:
|
2024-03-04 23:10:22 +08:00
|
|
|
- "${DOCKER_SERVER_PORT:-5005}:5005"
|
2024-02-28 21:17:09 +08:00
|
|
|
volumes:
|
2024-03-04 23:10:22 +08:00
|
|
|
- be-modules:/monkeytype/backend/node_modules
|
2024-02-28 21:17:09 +08:00
|
|
|
- ../../:/monkeytype
|
|
|
|
entrypoint: 'bash -c "cd /monkeytype/backend && npm install && npm run dev"'
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
mongo-data:
|
|
|
|
redis-data:
|
2024-03-04 23:10:22 +08:00
|
|
|
be-modules:
|