Updated: 2024-04-16
Read more at: https://coolify.io/docs/knowledge-base/git/gitlab/integration#private-repositories
Following Steps are outdated
Step 1: Connect Coolify with GitLab:
- Login
coolifydashboard - Click on Git Sources
- Click on Add > GitLab.com
- First enter the
HTML URL, it theurlwheregitlabis hosted - Then enter
APIwhich is<gitlab-url>/api - Then Choose
GitLab Application Type, it should beInstance-wide application (self-hosted) - Now, visit your
<gitlab-url>/admin/applicationsand click onNew Application. Enter the application name eg:coolify, inRedirect URIenter theWebhook URLfrom yourcoolifypage: Screenshot
And choose api, read_respository, email then Click Save application.
On next page, you'll the the OAuth ID, Application ID & Secret:
Screenshot - OAuth ID
Once, this is done, we're ready to deploy the apps.
Step 2: Create a repository and clone
Step 3: Setup laravel
Step 4: Create a Dockerfile at the root of the project:
FROM docker.io/bitnami/laravel:9
COPY . .
RUN composer install
CMD php artisan serve --host=0.0.0.0
EXPOSE 443
Commit all the files.
Step 5: Point your domain to coolify ip.
To do this you need to add 2 A record from your domain control panel:
A <project>.domain-name.com xxx.xxx.xxx.xxx
A *.<project>.domain-name.com xxx.xxx.xxx.xxx
xxx.xxx.xxx.xxx is your coolify server ip.
Step 6: Deploy Laravel
- From
coolifydashboard, click onApplications - Click on "+" icon and select source
- Select your repository
- Select the Destination
- Select
Dockerat "Configure Build Pack" screen - Now, on
Generalpage, choose following options:
URL (FQDN): <project>.domain-name.com
Port: 8000
Dockerfile Location: /Dockerfile
Base Directory: (keep the default value)
Enable Automatic Deployment: Enabled
Enable MR/PR Previews: Enableed
Debug Logs: Enabled
- Click
Saveand Click onBuild Logs, after success build visit the url, you will be able to see the Laravel.
Top comments (2)
Not working on Collify, this post is cloned from a very old post., you should test before posting
@demo_felhasznalo_5f85531e I have already written
Following Steps are out dated