mirror of
https://github.com/HabitRPG/habitica.git
synced 2026-05-03 19:40:48 -05:00
5dd9711413
* chore(mongodb): update local dev MongoDB versions * fix(github): update mongodb-github-action * test(api): attempt to gather more detail on failures * Revert "test(api): attempt to gather more detail on failures" This reverts commit215e768e90. * WIP mongodb-memory-serve * fix(mongo): start replica set * run mongo as gh action service * remove matrix for mongo * try npm -> docker instead of services * try "docker compose" * disable mongo bootstrap from build * try gh action again * try newer action version * working mongo docker compose 🎉 * fix(lint): leave out unused imports * update lock * cleanup previous workflow changes * remove previous code, dont share mongo data folders on runtype (rs and docker) * mongo docker for testing; align mongodb directory naming * remove run-rs, add docker:aio script call, use healthcheck to initiate again * merge docker-compose.yml, fix client port listening * fix oudated healthcheck param * chore(mongodb): update local dev MongoDB versions * fix(github): update mongodb-github-action * test(api): attempt to gather more detail on failures * Revert "test(api): attempt to gather more detail on failures" This reverts commit215e768e90. * WIP mongodb-memory-serve * run mongo as gh action service * fix(mongo): start replica set * remove matrix for mongo * try npm -> docker instead of services * try "docker compose" * disable mongo bootstrap from build * try gh action again * try newer action version * working mongo docker compose 🎉 * fix(lint): leave out unused imports * update lock * cleanup previous workflow changes * remove previous code, dont share mongo data folders on runtype (rs and docker) * mongo docker for testing; align mongodb directory naming * remove run-rs, add docker:aio script call, use healthcheck to initiate again * merge docker-compose.yml, fix client port listening * fix oudated healthcheck param * fix(config): remove dup keys * using npx vite during docker aio run --------- Co-authored-by: negue <eugen.bolz@gmail.com>
58 lines
1.3 KiB
YAML
58 lines
1.3 KiB
YAML
services:
|
|
client:
|
|
build:
|
|
context: .
|
|
dockerfile: ./Dockerfile-Dev
|
|
command: ["npm", "run", "client:dev:docker"]
|
|
depends_on:
|
|
- server
|
|
environment:
|
|
- BASE_URL=http://server:3000
|
|
networks:
|
|
- habitica
|
|
ports:
|
|
- "5173:5173"
|
|
volumes:
|
|
- .:/usr/src/habitica
|
|
- /usr/src/habitica/node_modules
|
|
- /usr/src/habitica/website/client/node_modules
|
|
server:
|
|
build:
|
|
context: .
|
|
dockerfile: ./Dockerfile-Dev
|
|
command: ["npm", "start"]
|
|
depends_on:
|
|
mongo:
|
|
condition: service_healthy
|
|
environment:
|
|
- NODE_DB_URI=mongodb://mongo/habitrpg
|
|
networks:
|
|
- habitica
|
|
ports:
|
|
- "3000:3000"
|
|
volumes:
|
|
- .:/usr/src/habitica
|
|
- /usr/src/habitica/node_modules
|
|
mongo:
|
|
image: "mongo:7.0"
|
|
container_name: "habitica-mongodb"
|
|
networks:
|
|
- habitica
|
|
hostname: "mongodb"
|
|
ports:
|
|
- "27017:27017"
|
|
restart: "unless-stopped"
|
|
volumes:
|
|
- "./mongodb-data-docker:/data/db"
|
|
entrypoint: [ "/usr/bin/mongod", "--bind_ip_all", "--replSet", "rs" ]
|
|
healthcheck:
|
|
test: echo "try { rs.status() } catch (err) { rs.initiate() }" | mongosh --port 27017 --quiet
|
|
interval: 10s
|
|
timeout: 30s
|
|
start_period: 0s
|
|
retries: 30
|
|
|
|
networks:
|
|
habitica:
|
|
driver: bridge
|