Self Hosting
Self-host with Docker
Discover how to self-host Litlyx with Docker in seconds.
1. Fork the project
From github fork the project on your local machine.
2. Build A Docker Image
Open the project in your favorite IDE. Run the following command in the terminal
.
docker
docker-compose build
3. Run A Docker Container
Run the following command in the terminal
.
docker
docker-compose up
4.a Forward data to your local instance with script tag
Add data-host
, add data-port
, add data-secure
and set up at true if is https, false if is http,
<script defer data-project="project_id_here"
data-host="your-host-name"
data-port="your-port"
data-secure="true/false"
src="https://cdn.jsdelivr.net/gh/litlyx/litlyx-js/browser/litlyx.js">
</script>
4.b Forward data to your local instance using npm
Add data-host
, add data-port
, add data-secure
and set up at true if is https, false if is http,
Lit.init('project_id', {
server: {
host: "your-host-name",
port: 123,
secure: true
}
})
5. Now is your turn.
Now you are up to go. You can use your own instance of Litlyx. Track analytics, easy way.