From d2875e90b226850e35eadbfee5e7c635f3cbf97a Mon Sep 17 00:00:00 2001 From: sadnub Date: Fri, 5 Aug 2022 12:09:13 -0400 Subject: [PATCH] fix docker dev --- .devcontainer/docker-compose.yml | 16 ---------------- .devcontainer/entrypoint.sh | 13 ------------- .devcontainer/requirements.txt | 6 +++--- 3 files changed, 3 insertions(+), 32 deletions(-) diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 35171164..7639642f 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -22,22 +22,6 @@ services: aliases: - tactical-backend - app-dev: - container_name: trmm-app-dev - image: node:16-alpine - restart: always - command: /bin/sh -c "npm install --cache ~/.npm && npm run serve" - user: 1000:1000 - working_dir: /workspace/web - volumes: - - ..:/workspace:cached - ports: - - "8080:${APP_PORT}" - networks: - dev: - aliases: - - tactical-frontend - # nats nats-dev: container_name: trmm-nats-dev diff --git a/.devcontainer/entrypoint.sh b/.devcontainer/entrypoint.sh index 47e6ee44..d12c80de 100644 --- a/.devcontainer/entrypoint.sh +++ b/.devcontainer/entrypoint.sh @@ -15,10 +15,7 @@ set -e : "${MESH_PASS:=meshcentralpass}" : "${MESH_HOST:=tactical-meshcentral}" : "${API_HOST:=tactical-backend}" -: "${APP_HOST:=tactical-frontend}" : "${REDIS_HOST:=tactical-redis}" -: "${HTTP_PROTOCOL:=http}" -: "${APP_PORT:=8080}" : "${API_PORT:=8000}" : "${CERT_PRIV_PATH:=${TACTICAL_DIR}/certs/privkey.pem}" @@ -142,16 +139,6 @@ if [ "$1" = 'tactical-init-dev' ]; then django_setup - # create .env file for frontend - webenv="$(cat << EOF -PROD_URL = "${HTTP_PROTOCOL}://${API_HOST}" -DEV_URL = "${HTTP_PROTOCOL}://${API_HOST}" -DEV_PORT = ${APP_PORT} -DOCKER_BUILD = 1 -EOF -)" - echo "${webenv}" | tee "${WORKSPACE_DIR}"/web/.env > /dev/null - # chown everything to tactical user chown -R "${TACTICAL_USER}":"${TACTICAL_USER}" "${WORKSPACE_DIR}" chown -R "${TACTICAL_USER}":"${TACTICAL_USER}" "${TACTICAL_DIR}" diff --git a/.devcontainer/requirements.txt b/.devcontainer/requirements.txt index 9f68525a..1216cd23 100644 --- a/.devcontainer/requirements.txt +++ b/.devcontainer/requirements.txt @@ -1,3 +1,3 @@ --r ../api/tacticalrmm/requirements.txt --r ../api/tacticalrmm/requirements-dev.txt --r ../api/tacticalrmm/requirements-test.txt \ No newline at end of file +-r /workspace/api/tacticalrmm/requirements.txt +-r /workspace/api/tacticalrmm/requirements-dev.txt +-r /workspace/api/tacticalrmm/requirements-test.txt