Hello! 👋
Thanks for contributing on stackoverflow-readme-profile. Before implementing new features and changes, feel free to submit an issue. We're going to talk here.
- Fork this repository.
- Create a new feature branch. (Eg:
feature/add-theme-burgger
) - Make your changes.
- Make a little check using
yarn lint && yarn test
- Commit your changes using the gitmoji convention.
- Submit your pull request.
- Clone the project
git clone https://github.com/johannchopin/stackoverflow-readme-profile.git
cd stackoverflow-readme-profile
- Install the dependencies
yarn
- Run a local postgres instance with docker
docker run --name MY_DOCKER_INSTANCE_NAME -p 5430:5432 -e POSTGRES_PASSWORD=MY_PWD -e POSTGRES_USER=MY_USER -e POSTGRES_DB=MY_DB_NAME -v my-postgres-db-db:/var/lib/postgresql/data -d postgres:15
- Add and adapt the
.env
variables
You will find an example of it in ./.env.example
.
- Run the start script
You can easily see your changes by running the express api located in ./src/api.ts
:
yarn start
- Navigate to http://localhost:5000/profile/8583669
The repo contains generated README files that present the different themes like https://github.com/johannchopin/stackoverflow-readme-profile/tree/main/docs/profile. Those are generated by using the following commands:
yarn docs:gen:template TEMPLATE_NAME # generate the profile badges
yarn docs:gen:ranking-template # generate the ranking badges
💡 I decided to generate them to avoid unnecessary server computation since the templates won't change much.
You can build the image by using the following command:
docker build -t johannchopin/stackoverflow-readme-profile .
You can push the image by using the following command:
docker push johannchopin/stackoverflow-readme-profile
To run the app together with postgresql you will need to copy the docker-compose.yml
file on you server. Near to it add a new .env
file and adapt the variables. You will find an example of it in ./.env.example
. You can then run:
docker-compose pull # be sure to get the latest johannchopin/stackoverflow-readme-profile image version
docker-compose up # start the engine
docker-compose stop
docker-compose down
docker-compose down --volumes # use it to remove the stored database volume