diff --git a/backend/scripts/repl b/backend/scripts/repl index 2f221f129..49e105305 100755 --- a/backend/scripts/repl +++ b/backend/scripts/repl @@ -2,7 +2,7 @@ export PENPOT_HOST=devenv export PENPOT_TENANT=dev -export PENPOT_FLAGS="$PENPOT_FLAGS enable-backend-asserts enable-audit-log enable-cors enable-transit-readable-response enable-demo-users" +export PENPOT_FLAGS="$PENPOT_FLAGS enable-backend-asserts enable-audit-log enable-transit-readable-response enable-demo-users disable-secure-session-cookies" # export PENPOT_DATABASE_URI="postgresql://172.17.0.1:5432/penpot" # export PENPOT_DATABASE_USERNAME="penpot" diff --git a/backend/scripts/start-dev b/backend/scripts/start-dev index 210b6cba5..d14831364 100755 --- a/backend/scripts/start-dev +++ b/backend/scripts/start-dev @@ -2,7 +2,7 @@ export PENPOT_HOST=devenv export PENPOT_TENANT=dev -export PENPOT_FLAGS="$PENPOT_FLAGS enable-backend-asserts enable-audit-log enable-cors enable-transit-readable-response enable-demo-users disable-secure-session-cookies" +export PENPOT_FLAGS="$PENPOT_FLAGS enable-backend-asserts enable-audit-log enable-transit-readable-response enable-demo-users disable-secure-session-cookies" set -ex diff --git a/docker/devenv/docker-compose.yaml b/docker/devenv/docker-compose.yaml index 2772b6b11..b06f5e0bb 100644 --- a/docker/devenv/docker-compose.yaml +++ b/docker/devenv/docker-compose.yaml @@ -14,7 +14,6 @@ volumes: services: main: - profiles: ["full"] privileged: true image: "penpotapp/devenv:latest" build: @@ -67,7 +66,6 @@ services: - PENPOT_LDAP_ATTRS_PHOTO=jpegPhoto minio: - profiles: ["full"] image: "minio/minio:latest" command: minio server /mnt/data --console-address ":9001" @@ -82,56 +80,6 @@ services: - 9000:9000 - 9001:9001 - backend: - profiles: ["backend"] - privileged: true - image: "penpotapp/devenv:latest" - build: - context: "." - container_name: "penpot-backend" - stop_signal: SIGINT - - depends_on: - - postgres - - redis - - volumes: - - "user_data:/home/penpot/" - - "${PWD}:/home/penpot/penpot:z" - - ports: - - 6060:6060 - - 6061:6061 - - 9090:9090 - - environment: - - EXTERNAL_UID=${CURRENT_USER_ID} - - PENPOT_SECRET_KEY=super-secret-devenv-key - - # SMTP setup - - PENPOT_SMTP_ENABLED=true - - PENPOT_SMTP_DEFAULT_FROM=no-reply@example.com - - PENPOT_SMTP_DEFAULT_REPLY_TO=no-reply@example.com - - PENPOT_SMTP_HOST=mailer - - PENPOT_SMTP_PORT=1025 - - PENPOT_SMTP_USERNAME= - - PENPOT_SMTP_PASSWORD= - - PENPOT_SMTP_SSL=false - - PENPOT_SMTP_TLS=false - - # LDAP setup - - PENPOT_LDAP_HOST=ldap - - PENPOT_LDAP_PORT=10389 - - PENPOT_LDAP_SSL=false - - PENPOT_LDAP_STARTTLS=false - - PENPOT_LDAP_BASE_DN=ou=people,dc=planetexpress,dc=com - - PENPOT_LDAP_BIND_DN=cn=admin,dc=planetexpress,dc=com - - PENPOT_LDAP_BIND_PASSWORD=GoodNewsEveryone - - PENPOT_LDAP_ATTRS_USERNAME=uid - - PENPOT_LDAP_ATTRS_EMAIL=mail - - PENPOT_LDAP_ATTRS_FULLNAME=cn - - PENPOT_LDAP_ATTRS_PHOTO=jpegPhoto - # keycloak: # image: "quay.io/keycloak/keycloak:15.0.2" # environment: diff --git a/manage.sh b/manage.sh index fc2e43d63..c86ef23a7 100755 --- a/manage.sh +++ b/manage.sh @@ -45,31 +45,15 @@ function pull-devenv-if-not-exists { function start-devenv { pull-devenv-if-not-exists $@; - # Check if the "backend-only" container is running. If it is, we need tot stop it first - if [[ ! $(docker ps -f "name=penpot-backend" -q) ]]; then - docker compose -p $DEVENV_PNAME --profile backend -f docker/devenv/docker-compose.yaml stop -t 2 backend; - fi - - docker compose -p $DEVENV_PNAME --profile full -f docker/devenv/docker-compose.yaml up -d; -} - -function start-backend { - pull-devenv-if-not-exists $@; - - # Check if the "devenv" container is running. If it is, we need tot stop it first because conflicts with the backend - if [[ ! $(docker ps -f "name=penpot-devenv-main" -q) ]]; then - docker compose -p $DEVENV_PNAME --profile full -f docker/devenv/docker-compose.yaml stop -t 2 main; - fi - - docker compose -p $DEVENV_PNAME --profile backend -f docker/devenv/docker-compose.yaml up -d; + docker compose -p $DEVENV_PNAME -f docker/devenv/docker-compose.yaml up -d; } function stop-devenv { - docker compose -p $DEVENV_PNAME --profile full --profile backend -f docker/devenv/docker-compose.yaml stop -t 2; + docker compose -p $DEVENV_PNAME -f docker/devenv/docker-compose.yaml stop -t 2; } function drop-devenv { - docker compose -p $DEVENV_PNAME --profile full --profile backend -f docker/devenv/docker-compose.yaml down -t 2 -v; + docker compose -p $DEVENV_PNAME -f docker/devenv/docker-compose.yaml down -t 2 -v; echo "Clean old development image $DEVENV_IMGNAME..." docker images $DEVENV_IMGNAME -q | awk '{print $3}' | xargs --no-run-if-empty docker rmi @@ -87,14 +71,6 @@ function run-devenv { docker exec -ti penpot-devenv-main sudo -EH -u penpot /home/start-tmux.sh } -function run-backend { - if [[ ! $(docker ps -f "name=penpot-backend" -q) ]]; then - start-backend - fi - - docker exec -ti penpot-backend sudo -EH -u penpot /home/start-tmux-back.sh -} - function build { echo ">> build start: $1" local version=$(print-current-version); @@ -200,9 +176,6 @@ function usage { echo "- stop-devenv Stops the development oriented docker compose service." echo "- drop-devenv Remove the development oriented docker compose containers, volumes and clean images." echo "- run-devenv Attaches to the running devenv container and starts development environment" - echo "- start-backend Start the backend only service." - echo "- run-backend Starts a backend-only instance and attach tmux to it" - echo " based on tmux (frontend at localhost:3449, backend at localhost:6060)." echo "" } @@ -227,15 +200,9 @@ case $1 in start-devenv) start-devenv ${@:2} ;; - start-backend) - start-backend ${@:2} - ;; run-devenv) run-devenv ${@:2} ;; - run-backend) - run-backend ${@:2} - ;; stop-devenv) stop-devenv ${@:2} ;;