GitFOSS is a small and simple, free and open-source Git Forge built w/ Node.JS, Fastify, Prisma and React!
In order to run your own instance of GitFOSS, the first step is to clone this git repository and cd into it:
$ git clone https://gitfoss.io/ethicdevs/gitfoss.git
$ cd gitfoss/
Make sure your .env.local file is correctly setup and includes all the environment
variables present in the example .env file. Make sure no value is set to fake.
$ yarn dev # Run dev 'server'
$ yarn typecheck # Check TypeScript types validity
$ yarn test # Run app tests
Also when performing changes to the Prisma schema, don't forget to make a new migration files using the following command:
$ yarn migrate:dev # Create a new migration file interactively
Make sure your .env.production file is correctly setup and includes all the environment
variables present in the example .env file. Make sure no value is set to fake.
$ yarn build
$ cp .env.production dist/.env.production
$ DATABASE_URL='postgresql://...from.env.production...' yarn migrate:deploy
$ yarn start
$ docker run -p 1337:1337 \
-e COOKIE_NAME='gitfoss_ssid' \
-e COOKIE_SECRET='change_me_cookie_secret' \
-e DATABASE_URL='postgresql://...from.env.production...' \
-e DEPLOYMENT_DOMAIN='local-app.localhost' \
-e DEPLOYMENT_SCHEME='http' \
-e GIT_REPOSITORIES_ROOT='/var/lib/gitfoss/repos' \
docker.io/library/gitfoss_web:latest
# Get the container id then run migrations
$ docker exec -it <container_id_here> yarn migrate:deploy
$ docker-compose up -d
$ docker-compose exec web yarn migrate:deploy
We also have a docker-compose.caddy.yml and docker-compose.traefik.yml for running GitFOSS using Caddy and Traefik reverse-proxies respectively.
/var/log/gitfoss/git_ssh.log: Whatever happens on git over ssh/var/log/gitfoss/git_http.log: Whatever happens on git over http(s)/var/log/gitfoss/web.log: Whatever happens over web ui/var/log/gitfoss/ci.log: Whatever happens over CI/var/log/gitfoss/ci-runner-$n.log: Whatever happens over CI runner $nThis project is licensed under the MIT license.
GitFOSS hosted on GitFOSS! :)
gitfoss.
https://gitfoss.dev/ethicdevs/gitfoss.gitgit@gitfoss.dev:ethicdevs/gitfoss.gitTags:v0.2.0,