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
$ docker-compose exec traefik cat /var/log/traefik/traefik.log
This project is licensed under the MIT license.
GitFOSS hosted on GitFOSS! :)
gitfoss.
https://gitfoss.dev/ethicdevs/gitfoss.gitgit@gitfoss.dev:ethicdevs/gitfoss.gitBranches:master.