Skip to content

Latest commit

 

History

History
190 lines (124 loc) · 6.65 KB

README.md

File metadata and controls

190 lines (124 loc) · 6.65 KB

📝 Keycloak Docker Compose

Keycloak Badge Docker Badge PostgreSQL Badge


This project serves the purpose of setting up a Keycloak instance leveraging docker compose exposed over HTTPS leveraging self-signed certificates.


Report Bug · Request Feature

📚 Table of contents

💡 Structure

🚀 Installation and Execution

🔨 Prerequisites

sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
sudo chmod a+x /usr/local/bin/yq

🔝 Back to top

🗜️ Getting Started

To get started with this project, you need to run the start.sh script. This script accepts several options:

  • --db_user: PostgreSQL database user. Default: keycloak
  • --db_password: PostgreSQL database password. Default: keycloak
  • --db_name: PostgreSQL database name. Default: keycloak
  • --gen_certs: Indicates if self-signed certificates should be generated
  • --key: Path to the private key file (required if --gen_certs is not set)
  • --cert: Path to the certificate file (required if --gen_certs is not set)
  • --cert-cn: Common Name (CN) for the generated self-signed certificates. Default: Ip of eth0 interface of your system
  • --cert-org: Organization (O) for the generated self-signed certificates. Default: CodeTriarii
  • --user: User for the Keycloak instance admin. Default: admin
  • --password: Password for the Keycloak instance admin. Default: admin
  • --port: Port for the Keycloak instance. Default: 8443
  • --ream: [Optional] Points to a realm json file to set the import.
  • --clean: If set, removes the docker compose and auxiliary generated assets.
  • --debug: Enables debug verbosity.

Help

Here's an example of how to run the script:

./start.sh --port 8443 --gen_certs

Tip

If you want to enable more verbosity in logs, just pass the --debug argument!

Keycloak

Tip

If you want the port to be mapped with 443 (privileged port), launch the command with sudo!

Tip

You can load a realm of your own by using the --realm <path-to-file>.json option.

🔝 Back to top

📍 Roadmap

  • Automated start script.
  • Included automated clean-up.
  • Extended help for user friendly understanding.
  • Included multiple args for flexibility.
  • Prepared for HTTPS. Either with cert automated generation or inputting your own certs.

See the open issues for a full list of proposed features (and known issues).

🔝 Back to top

📎 Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated 💹.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".

  1. Fork the Project

  2. Create your Feature Branch

    git checkout -b feature/AmazingFeature
  3. Commit your Changes

    git commit -m 'Add some AmazingFeature
  4. Push to the Branch

    git push origin feature/AmazingFeature
  5. Open a Pull Request

🔝 Back to top

📃 License

Distributed under the APACHE 2.0 License.

🔝 Back to top

👥 Contact


PAF TRIARII ([email protected]) a member of Code Triarii


X TikTok Medium YouTube Instagram

As we always state, our main purpose is keep learning, contributing to the community and finding ways to collaborate in interesting initiatives. Do not hesitate to contact us at [email protected]

If you are interested in our content creation, also check our social media accounts. We have all sorts of training resources, blogs, hackathons, write-ups and more! Do not skip it, you will like it 😏 😏 😏 👍

Don't forget to give the project a star if you liked it! Thanks again! 🌟 💛

🔝 Back to top

🔍 Acknowledgments

💯 💯 💯 For those that are curious about some of the resources or utilities and for sure thanking and giving credit to authors, we provide you a list of the most interesting ones (in our understanding) 💯 💯 💯

🔝 Back to top