You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Log in to dash.dlsu-lscs.org with your account provided to you.
Go to Infrastructure Team > Projects > LSCS Applications > Choose production/development (for now you can choose production) environment
If your application/project assigned to you is an API, it will most likely require a database (see guide below)
Click New > Public Repository > Then add the github link of your repository > Check repository > Change Build Packs to Dockerfile > Continue
(OPTIONAL for API repositories) Add a database by going back to Projects > LSCS Databases > New > Choose database provider like Postgres, MySQL (consult with your project head for this)
Once here, you can see different tabs and configurations to do (you can explore all of these).
Note
The most important ones are: General, Environment Variables, Webhooks, Git Source
Application Configuration in Coolify:
In General tab:
Change Name to the repository name (ex. lscs-core-web, lscs-core-api)
Change domains (if you do not know what to put for project then consult with your project head or me)
NOTE: make sure to put https:// (Coolify auto-handles TLS automatically via Traefik reverse proxy - basically free HTTPS)
Change Network Port to the appropriate port (check your .env.example or Dockerfile or the entrypoint of the project like index.ts or server.ts)
For Next.js Projects, usually just put 3000 (default port for Next.js)
For APIs, also 3000 but consult with the project head or backend devs of the project (see server.ts or .env.example to check if PORT is configured there)
In Environment Variables tab:
Note
For API projects (or if your project connects to a database created in Coolify, MAKE SURE to create a database then expose it publicly (see below)
Ask the project head or developers of the project for the actual .env file for the environment variables
Once you have the .env, go to Developer View > Copy and paste these variables > Save all environment variables
Other tabs:
In Git Source, just check the branch - if you want to create a dev environment, use the development (or equivalent) branch of the repository. Usually projects have development branches so you should do this.
In Webhooks, get the URL (Deploy Webhook (auth required)) for the COOLIFY_WEBHOOK > Copy this and save for later for deployment CD configuration
Start the application by pressing Start
Creating a Database in Coolify
Follow the steps above normally
Make sure the database project is in LSCS Databases
The appropriate database provider is correct (PostgreSQL or MySQL or MongoDB, etc.)
Create > Name to <Project> Database > Start (this is needed to be done first before exposing this to the public)
Expose a Public Endpoint for the database
General tab > Proxy > Check Make it publicly available > Configure public port (should be a number from 10000-65535, to avoid collision)
For this PR, complete the following tasks below after you've done the tasks above:
Add deployment workflow for CD (Github Actions) in .github/workflows/ directory
You can check the dlsu-lscs/lscs-infra repository for this (see: 003-trigger-deployment.yml)
Configure COOLIFY_TOKEN and COOLIFY_WEBHOOK in Settings > Secrets and Variables > Actions > New repository secret
See #devops-reminders channel in Discord for the COOLIFY_TOKEN
Paste the copied Webhook here as a repository secret and name it COOLIFY_WEBHOOK (or what name you put in your deployment CD workflow)
Once done mention me @ejsadiarin for reviews and questions
Coolify Project Deployment Steps
dash.dlsu-lscs.orgwith your account provided to you.Projects>LSCS Applications> Choose production/development (for now you can choose production) environmentNew> Public Repository > Then add the github link of your repository >Check repository> Change Build Packs toDockerfile>ContinueProjects>LSCS Databases>New> Choose database provider like Postgres, MySQL (consult with your project head for this)Once here, you can see different tabs and configurations to do (you can explore all of these).
Note
The most important ones are: General, Environment Variables, Webhooks, Git Source
Application Configuration in Coolify:
In General tab:
lscs-core-web,lscs-core-api)https://(Coolify auto-handles TLS automatically via Traefik reverse proxy - basically free HTTPS).env.exampleorDockerfileor the entrypoint of the project likeindex.tsorserver.ts)3000(default port for Next.js)3000but consult with the project head or backend devs of the project (seeserver.tsor.env.exampleto check if PORT is configured there)In Environment Variables tab:
Note
For API projects (or if your project connects to a database created in Coolify, MAKE SURE to create a database then expose it publicly (see below)
.envfile for the environment variables.env, go toDeveloper View> Copy and paste these variables > Save all environment variablesOther tabs:
development(or equivalent) branch of the repository. Usually projects have development branches so you should do this.Deploy Webhook (auth required)) for theCOOLIFY_WEBHOOK> Copy this and save for later for deployment CD configurationStartCreating a Database in Coolify
LSCS Databases<Project> Database> Start (this is needed to be done first before exposing this to the public)Make it publicly available> Configure public port (should be a number from 10000-65535, to avoid collision)For this PR, complete the following tasks below after you've done the tasks above:
.github/workflows/ directory003-trigger-deployment.yml)COOLIFY_TOKENandCOOLIFY_WEBHOOKin Settings > Secrets and Variables > Actions > New repository secret#devops-reminderschannel in Discord for theCOOLIFY_TOKENCOOLIFY_WEBHOOK(or what name you put in your deployment CD workflow)Once done mention me @ejsadiarin for reviews and questions
Assigned to @ig21xn-dlsu