Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

peterlc's avatar

BitBucket+Forge+DigitalOcean+Envoyer

Hi guys,

Don't get me wrong i really like Forge and Envoyer.

My set up BitBucket+Forge+DigitalOcean+Envoyer works fine but i can't see why i can't manage with BitBucket+Cloudways+DigitalOcean.

Yeah i know the benefits with no down time and current versions with Envoyer but with CW i can revert messed up deployment and that is enough for me.

I sometimes feel the Forge+Envoyer is a bit over kill for my needs.

Now to my questions:

  1. Is there any big no-no's with BitBucket+Cloudways+DigitalOcean Laravel wise?

  2. With Envoyer i run artisan/composer upon deploy but cant i push "everything" and get the exact content i have in my dev that i know works?

0 likes
12 replies
peterlc's avatar

Dit some speed testing and CW were slightly faster.

What is you opinion @bashy ?

peterlc's avatar

Thank you @bashy .

Interesting, so GitLab is instead of for ex. BitBucket?

What type of server provider do you use then?

Will it work on an DO droplet?

bashy's avatar
bashy
Best Answer
Level 65

@peterlc Yes, GitLab for Git repos. I use GitHub for opensource/freelance stuff.

I use OVH for my servers (dedicated + cloud + vps) and I maintain them myself but you can attach DO (or any server that has SSH access + required packages) to the deployer, just like Envoyer allows.

1 like
peterlc's avatar

@bashy i have installed REBELinBLUE/deployer on my VPS on CW and i get:

Server error

A connection could not be established to the socket at https://deployer.diit.se. This is required for reporting the status on running deployments. Please reload, if the issue continues please contact the system administrator

I guess this has something to do with:

SOCKET_URL=https://deployer.diit.se
SOCKET_PORT=
SOCKET_SSL_KEY_FILE=
SOCKET_SSL_CERT_FILE=
SOCKET_SSL_CA_FILE=
SOCKET_SSL_KEY_PASSPHRASE=

Please point me in the right direction :)

There is also an guide on "Setup your webserver" but i'm running this as any other site om my VPS right?

bashy's avatar

@peterlc Sorry for the late reply. Here's what works for me. I proxy it through Cloudflare so I use port 8443.

.env

SOCKET_URL=https://deploy.domain.com:8443
SOCKET_PORT=8443
SOCKET_SSL_KEY_FILE=/etc/nginx/certs/domain-key.pem
SOCKET_SSL_CERT_FILE=/etc/nginx/certs/domain-cert.pem

vhost

upstream websocket {
    server 127.0.0.1:6001;
}

server {
    [..]

    # prevents 502 Bad Gateway error
    large_client_header_buffers 8 32k;

    location /socket.io {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $host;
        proxy_set_header X-NginX-Proxy true;

        # prevents 502 bad gateway error
        proxy_buffers 8 32k;
        proxy_buffer_size 64k;

        proxy_pass http://websocket;
        proxy_redirect off;

        # enables WS support
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
}
peterlc's avatar

No problem @bashy , i'm just so grateful that you bother answering my stupid questions.

Can i just ask you what i will be able to do/gain with this deployer compared to auto deploy upon push that i have now?

bashy's avatar

@peterlc I'm not sure what setup you're using but it supports multiple servers, notifications, zero-downtime, add additional commands etc. Plus it's self-hosted so you can control the data :)

peterlc's avatar

Thank you, i will try to get it running :)

peterlc's avatar

Do you use Cloudflare only for this or for all your sites?

Can i make this work with Free plan on Cloudflare?

bashy's avatar

@peterlc Will have to mention me as I won't get notifications otherwise.

I use CF for most of my sites. Just easier. You can get it working on CF free plan.

vhost file should normally go in /etc/nginx/sites-available/ then symlink it to sites-enabled as you will normally be including that directory via wildcard in nginx.conf.

Please or to participate in this conversation.