From 20642f0e59262696767e03da679eed625867afcb Mon Sep 17 00:00:00 2001 From: Andrew Smith Date: Tue, 21 May 2024 19:52:58 +0000 Subject: [PATCH] add docker back to devpod --- .devcontainer/devcontainer.json | 5 ++++- .devcontainer/post-start.sh | 17 ++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index cd3bee4f0..a6550fe8e 100755 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -4,6 +4,9 @@ "dockerfile": "Dockerfile" }, "features": { + "ghcr.io/devcontainers/features/docker-outside-of-docker:1": { + "version": "23.0.7" + }, "ghcr.io/devcontainers/features/dotnet:2": { "version": "7.0.403" }, @@ -13,7 +16,7 @@ "ghcr.io/devcontainers/features/powershell:1": {} }, "customizations": { - "devpod": { + "devpod": { "prebuildRepository": "ghcr.io/andrew-codes/playnite-web" }, "vscode": { diff --git a/.devcontainer/post-start.sh b/.devcontainer/post-start.sh index 9a57e54c6..9543bcbc1 100755 --- a/.devcontainer/post-start.sh +++ b/.devcontainer/post-start.sh @@ -4,18 +4,17 @@ git lfs install set -o allexport . $PWD/local.env -. $PWD/dev.env set +o allexport mkdir -p .data/mongodb -# docker stop playnite-web-db || true -# docker container rm playnite-web-db || true -# docker run --rm --name playnite-web-db -d \ -# --network host \ -# -e MONGO_INITDB_ROOT_USERNAME=$MONGO_INITDB_ROOT_USERNAME \ -# -e MONGO_INITDB_ROOT_PASSWORD=$MONGO_INITDB_ROOT_PASSWORD \ -# -v $PWD/.data/mongodb:/data/db \ -# mongo:7.0.3-jammy +docker stop playnite-web-db || true +docker container rm playnite-web-db || true +docker run --rm --name playnite-web-db -d \ + --network host \ + -e MONGO_INITDB_ROOT_USERNAME=$MONGO_INITDB_ROOT_USERNAME \ + -e MONGO_INITDB_ROOT_PASSWORD=$MONGO_INITDB_ROOT_PASSWORD \ + -v $PWD/.data/mongodb:/data/db \ + mongo:7.0.3-jammy mosquitto_passwd -b -c /etc/mosquitto/passwd $MQTT_USERNAME $MQTT_PASSWORD echo -e "allow_anonymous false