Skip to content

provision:website root instead of deployer #3130

Closed

Description

@zvxas
  • Deployer version: dev
  • Deployment OS: ubuntu 20.04 lts

Problem with "provision:website" task, remote_user gets set to deployer:

set('remote_user', 'deployer');

but $publicPath is still /root/test. Caddyfile gets put to /root/test/Caddyfile, caddy can't read that file and it fails to restart.
In deploy.php I set "deploy_path" to "~/test".
Setting deploy_path to "/home/deploy/test" instead everything works fine.

What's the expected behaviour? I suppose everything should be done through deployer, NOT root?

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

Activity

  1. antonmedv commented on May 14, 2022

    @antonmedv
    Member

    This is strange. Yes, website should be done via deployer user. Can you show output of dep config command?

  2. zvxas commented on May 14, 2022

    @zvxas
    Author
    192.168.56.106:
        alias: 192.168.56.106
        become: root
        bin/composer: { error: 'The command "cd ~/test && (if [ -f ~/test/.dep/composer.phar
     ]; then echo +accurate; fi)" failed.' }
        bin/console: { error: 'The command "cd ~/test && (command -v ''php'' || which ''php'
    ' || type -p ''php'')" failed.' }
        bin/git: { error: 'The command "cd ~/test && (command -v ''git'' || which ''git'' ||
     type -p ''git'')" failed.' }
        bin/php: { error: 'The command "cd ~/test && (command -v ''php'' || which ''php'' ||
     type -p ''php'')" failed.' }
        bin/symlink: { error: 'The command "cd ~/test && ((man ln 2>&1 || ln -h 2>&1 || ln -
    -help 2>&1) | grep -- --relative || true)" failed.' }
        branch: HEAD
        cleanup_use_sudo: false
        clear_paths: {  }
        clear_use_sudo: false
        composer_action: install
        composer_options: '--verbose --prefer-dist --no-progress --no-interaction --no-dev -
    -optimize-autoloader'
        console_options: '--no-interaction'
        copy_dirs: {  }
        current_path: ~/test/current
        db_name: { ask: ' DB name: ' }
        db_password: { ask: ' DB password: ' }
        db_type: { ask: ' What DB to install? ' }
        db_user: { ask: ' DB user: ' }
        default_timeout: 300
        deploy_path: ~/test
        doctrine_schema_validate_config: ''
        domain: { ask: ' Domain: ' }
        dotenv: false
        env: {  }
        forward_agent: true
        git_ssh_command: 'ssh -o StrictHostKeyChecking=accept-new'
        hostname: 192.168.56.106
        http_group: { error: 'The command "cd ~/test && (ps axo comm,group | grep -E ''[a]pa
    che|[h]ttpd|[_]www|[w]ww-data|[n]ginx'' | grep -v root | sort | awk ''{print $NF}'' | un
    iq)" failed.' }
        http_user: { error: 'The command "cd ~/test && (ps axo comm,user | grep -E ''[a]pach
    e|[h]ttpd|[_]www|[w]ww-data|[n]ginx'' | grep -v root | sort | awk ''{print $NF}'' | uniq
    )" failed.' }
        keep_releases: 10
        lsb_release: { error: 'The command "lsb_release -s -c" failed.' }
        migrations_config: ''
        nodejs_version: node_16.x
        php_version: { ask: ' What PHP version to install? ' }
        public_path: { ask: ' Public path: ' }
        recipes: [provision, common, symfony]
        release_name: { error: 'The command "cd ~/test && (cat .dep/latest_release || echo 0
    )" failed.' }
        release_or_current_path: { error: 'The command "cd ~/test && (if [ -h ~/test/release
     ]; then echo +indeed; fi)" failed.' }
        release_path: { error: 'The command "cd ~/test && (if [ -h ~/test/release ]; then ec
    ho +precise; fi)" failed.' }
        release_revision: { error: 'The command "cd ~/test && (if [ -h ~/test/release ]; the
    n echo +precise; fi)" failed.' }
        releases_list: { error: 'The command "cd ~/test && (if [ -d releases ] && [ "$(ls -A
     releases)" ]; then echo +precise; fi)" failed.' }
        releases_log: { error: 'The command "cd ~/test && (if [ -f .dep/releases_log ]; then
     echo +right; fi)" failed.' }
        remote_user: deuru
        repository: 'https://github.com/deployphp/deployer.git'
        rollback_candidate: { error: 'The command "cd ~/test && (readlink ~/test/current)" f
    ailed.' }
        shared_dirs: [var/log]
        shared_files: [.env.local]
        shell: 'bash -ls'
        sudo_password: { ask: ' Password for sudo: ' }
        symfony_version: { error: 'The command "cd ~/test && (command -v ''php'' || which ''
    php'' || type -p ''php'')" failed.' }
        target: HEAD
        update_code_strategy: archive
        use_atomic_symlink: { error: 'The command "cd ~/test && ((man mv 2>&1 || mv -h 2>&1 
    || mv --help 2>&1) | grep -- --no-target-directory || true)" failed.' }
        use_relative_symlink: { error: 'The command "cd ~/test && ((man ln 2>&1 || ln -h 2>&
    1 || ln --help 2>&1) | grep -- --relative || true)" failed.' }
        user: zvxas
        working_path: ~/test
        writable_chmod_mode: '0755'
        writable_dirs: [var, var/cache, var/log, var/sessions]
        writable_mode: acl
        writable_recursive: false
        writable_use_sudo: false
    
  3. locked and limited conversation to collaborators on May 14, 2022
  4. converted this issue into a discussion #3132 on May 14, 2022
  5. temporarily blocked zvxason Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions