How to use Git for phpBB deployment on VPS

Discuss general development subjects that are not specific to a particular version like the versioning control system we use or other infrastructure.
Post Reply
User avatar
ababak
Registered User
Posts: 2
Joined: Mon Apr 20, 2020 3:51 pm

How to use Git for phpBB deployment on VPS

Post by ababak »

Hi,

I was quite surprised that I couldn't find step-by-step instructions for phpBB git deployment to production environments.

So there are some articles that show how to set up a local branch for development but still not a word about deployment to production servers.

What I've been thinking of:

Development
  1. Clone a repository:

    Code: Select all

    git clone git@github.com:phpbb/phpbb.git
  2. Remove the origin remote:

    Code: Select all

    git remote remove origin
  3. Add my own origin:

    Code: Select all

    git remote add origin ...
  4. Add an upstream remote:

    Code: Select all

    git remote add upstream git@github.com:phpbb/phpbb.git
  5. Checkout the 3.3.x code:

    Code: Select all

    git checkout upstream/3.3.x
  6. Update .gitignore to include my changes (extensions/templates/language files) (?)
  7. Make some changes
  8. Get the recent upstream updates:

    Code: Select all

    git pull upstream 3.3.x
  9. Commit the changes
  10. Push the changes

Production
  1. Set up a bare repository on a production server
  2. Set up a post-receive hook that will move the "phpBB" folder to my webserver's "www" folder overwriting the existing folders
  3. Execute some scripts (maybe, set permissions?)
Please share how do you deploy the phpBB code to live production servers.

Thank you.

User avatar
Elias
Registered User
Posts: 15
Joined: Thu Jul 31, 2008 2:08 pm
Location: In the Water
Contact:

Re: How to use Git for phpBB deployment on VPS

Post by Elias »

--
Last edited by Elias on Tue Apr 28, 2020 6:10 am, edited 1 time in total.
"Mystery creates wonder, and wonder is the basis of man's desire to understand." - Neil Armstrong
|Installing Extensions|Writing Extensions|Extension Validation Policy

User avatar
3Di
Registered User
Posts: 951
Joined: Tue Nov 01, 2005 9:50 pm
Location: Milano 🇮🇹 Frankfurt 🇩🇪
Contact:

Re: How to use Git for phpBB deployment on VPS

Post by 3Di »

You should not deploy teh development code on a production site.
Just use the official download package and follow the instructions.

See https://www.phpbb.com/downloads/
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades

User avatar
Crizzo
Translations & International Support Teams Manager
Translations & International Support Teams Manager
Posts: 27
Joined: Sun Jul 14, 2013 11:57 am

Re: How to use Git for phpBB deployment on VPS

Post by Crizzo »

3Di wrote: Tue Apr 28, 2020 4:38 am You should not deploy teh development code on a production site.
Just use the official download package and follow the instructions.

See https://www.phpbb.com/downloads/
Hi,

he could simple use the release tags and then the version is the same as on the download package.. Don't see what is against that.

But maybe he wants to use this repo instead https://github.com/phpbb/phpbb-app This does not have tests etc. included.

Regards

User avatar
Noxwizard
Support Team Leader
Support Team Leader
Posts: 137
Joined: Sun Dec 18, 2005 5:44 pm
Location: Texas
Contact:

Re: How to use Git for phpBB deployment on VPS

Post by Noxwizard »

Crizzo wrote: Sun May 03, 2020 7:40 pm he could simple use the release tags and then the version is the same as on the download package.. Don't see what is against that.
Even this is not ready to go, you need to run composer to get the third-party libraries pulled in. We don't provide official support in the main support forums for folks running off git due to the extra unknowns of the setup (commit/tag they're on, has composer been run recently, etc.).

User avatar
3Di
Registered User
Posts: 951
Joined: Tue Nov 01, 2005 9:50 pm
Location: Milano 🇮🇹 Frankfurt 🇩🇪
Contact:

Re: How to use Git for phpBB deployment on VPS

Post by 3Di »

Not to mention new migrations and the likes, no... it is a very bad idea .
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades

User avatar
Crizzo
Translations & International Support Teams Manager
Translations & International Support Teams Manager
Posts: 27
Joined: Sun Jul 14, 2013 11:57 am

Re: How to use Git for phpBB deployment on VPS

Post by Crizzo »

Noxwizard wrote: Sun May 03, 2020 8:31 pm
Crizzo wrote: Sun May 03, 2020 7:40 pm he could simple use the release tags and then the version is the same as on the download package.. Don't see what is against that.
Even this is not ready to go, you need to run composer to get the third-party libraries pulled in. We don't provide official support in the main support forums for folks running off git due to the extra unknowns of the setup (commit/tag they're on, has composer been run recently, etc.).
Well, this is not a big step.

The version of the third-party libraries is freezed with the composer.lock file and if he checks out like: "release-3.3.0" and runs "composer.phar install" nothing i wrong with that version.
3Di wrote: Tue May 05, 2020 12:27 am Not to mention new migrations and the likes, no... it is a very bad idea .
What do you mean? What "likes"? Why should that not work? :?

User avatar
ababak
Registered User
Posts: 2
Joined: Mon Apr 20, 2020 3:51 pm

Re: How to use Git for phpBB deployment on VPS

Post by ababak »

Thank you for the insights, it’s very helpful.

Post Reply