fix docker dev

This commit is contained in:
sadnub 2022-08-05 12:09:13 -04:00
parent ff461d1d02
commit d2875e90b2
3 changed files with 3 additions and 32 deletions

View File

@ -22,22 +22,6 @@ services:
aliases: aliases:
- tactical-backend - 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
nats-dev: nats-dev:
container_name: trmm-nats-dev container_name: trmm-nats-dev

View File

@ -15,10 +15,7 @@ set -e
: "${MESH_PASS:=meshcentralpass}" : "${MESH_PASS:=meshcentralpass}"
: "${MESH_HOST:=tactical-meshcentral}" : "${MESH_HOST:=tactical-meshcentral}"
: "${API_HOST:=tactical-backend}" : "${API_HOST:=tactical-backend}"
: "${APP_HOST:=tactical-frontend}"
: "${REDIS_HOST:=tactical-redis}" : "${REDIS_HOST:=tactical-redis}"
: "${HTTP_PROTOCOL:=http}"
: "${APP_PORT:=8080}"
: "${API_PORT:=8000}" : "${API_PORT:=8000}"
: "${CERT_PRIV_PATH:=${TACTICAL_DIR}/certs/privkey.pem}" : "${CERT_PRIV_PATH:=${TACTICAL_DIR}/certs/privkey.pem}"
@ -142,16 +139,6 @@ if [ "$1" = 'tactical-init-dev' ]; then
django_setup 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 everything to tactical user
chown -R "${TACTICAL_USER}":"${TACTICAL_USER}" "${WORKSPACE_DIR}" chown -R "${TACTICAL_USER}":"${TACTICAL_USER}" "${WORKSPACE_DIR}"
chown -R "${TACTICAL_USER}":"${TACTICAL_USER}" "${TACTICAL_DIR}" chown -R "${TACTICAL_USER}":"${TACTICAL_USER}" "${TACTICAL_DIR}"

View File

@ -1,3 +1,3 @@
-r ../api/tacticalrmm/requirements.txt -r /workspace/api/tacticalrmm/requirements.txt
-r ../api/tacticalrmm/requirements-dev.txt -r /workspace/api/tacticalrmm/requirements-dev.txt
-r ../api/tacticalrmm/requirements-test.txt -r /workspace/api/tacticalrmm/requirements-test.txt