Quick Start
This guide will help start a GitLab Classrooms instance quickly.
With Docker
Info
Pre-requisites :
- Docker installed on your system
- a running PostgreSQL database
- access to a GitLab instance
Run the following command :
docker run -d \
--name gitlab-classrooms-app \
-p 8080:8080 \
-e POSTGRESQL_ADDON_HOST=<your-postgresql-host> \
-e POSTGRESQL_ADDON_PORT=<your-postgresql-port> \
-e POSTGRESQL_ADDON_DB=<your-database-name> \
-e POSTGRESQL_ADDON_USER=<your-database-user> \
-e POSTGRESQL_ADDON_PASSWORD=<your-database-password> \
-e GITLAB_URL=<your-gitlab-url> \
-e GITLAB_CLIENT_ID=<your-gitlab-client-id> \
-e GITLAB_CLIENT_SECRET=<your-gitlab-client-secret> \
gitlabclassrooms/app:0.4.2
Replace the following placeholders with your actual PostgreSQL database details:
<your-postgresql-host>: The hostname or IP address of your PostgreSQL server<your-postgresql-port>: The port number on which PostgreSQL is running (usually 5432)<your-database-name>: The name of the database for GitLab Classrooms<your-database-user>: The username for accessing the database<your-database-password>: The password for the database user
See Database configuration for database configuration details.
Replace the following placeholders with your GitLab instance details:
<your-gitlab-url>: The URL of your GitLab instance (e.g., https://gitlab.com)<your-gitlab-client-id>: The Application ID from your GitLab OAuth application<your-gitlab-client-secret>: The Secret from your GitLab OAuth application
See GitLab configuration for GitLab connectivity configuration details.
GitLab Classrooms should be available at http://localhost:8080.
With Docker Compose
Info
Pre-requisites :
- Docker & Docker Compose installed on your system
- access to a GitLab instance
The following docker-compose.yml file starts a PostgreSQL database and the GitLab Classrooms app :
services:
classroom:
image: gitlabclassrooms/app:0.4.2
ports:
- "8080:8080"
environment:
- POSTGRESQL_ADDON_HOST=pg_database
- POSTGRESQL_ADDON_PORT=5432
- POSTGRESQL_ADDON_DB=gitlab_classrooms
- POSTGRESQL_ADDON_USER=gitlab_classrooms_user
- POSTGRESQL_ADDON_PASSWORD=password
- GITLAB_URL=<your-gitlab-url>
- GITLAB_CLIENT_ID=<your-gitlab-client-id>
- GITLAB_CLIENT_SECRET=<your-gitlab-client-secret>
depends_on:
- pg_database
pg_database:
image: postgres:14
ports:
- "5432:5432"
environment:
- POSTGRES_DB=gitlab_classrooms
- POSTGRES_USER=gitlab_classrooms_user
- POSTGRES_PASSWORD=password
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
postgres_data:
Replace the following placeholders with your GitLab instance details:
<your-gitlab-url>: The URL of your GitLab instance (e.g., https://gitlab.com)<your-gitlab-client-id>: The Application ID from your GitLab OAuth application<your-gitlab-client-secret>: The Secret from your GitLab OAuth application
See GitLab configuration for GitLab connectivity configuration details.
GitLab Classrooms should be available at http://localhost:8080.