From 8e45af1396bad30917c1d508f08ddd78ef0589fc Mon Sep 17 00:00:00 2001 From: TheFrenchGhosty <47571719+TheFrenchGhosty@users.noreply.github.com> Date: Sun, 24 Oct 2021 11:49:40 +0000 Subject: [PATCH] Enhance the deployment documentation and add a docker-compose [skip ci] (#55) * Enhance the deployment documentation and add a docker-compose * Fix a typo * Fix various spelling mistake * Apply the requested change --- README.md | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 944346a..e3168b5 100644 --- a/README.md +++ b/README.md @@ -30,18 +30,41 @@ For this purpose, *Lingva* is built, among others, with the following Open Sourc As *Lingva* is a [NextJS](https://nextjs.org/) project you can deploy your own instance anywhere Next is supported. -The only requerement is to set an environment variable called `NEXT_PUBLIC_SITE_DOMAIN` with the domain you're deploying the instance under. This is used for the canonical URL and the meta tags. +The only requirement is to set an environment variable called `NEXT_PUBLIC_SITE_DOMAIN` with the domain you're deploying the instance under. This is used for the canonical URL and the meta tags. -The easiest way is to use their creators' own platform, [Vercel](https://vercel.com/), where you can deploy it for free with the following button. +### Docker -[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https%3A%2F%2Fgithub.com%2FTheDavidDelta%2Flingva-translate%2Ftree%2Fmain&env=NEXT_PUBLIC_SITE_DOMAIN&envDescription=Your%20domain) +An [official Docker image](https://hub.docker.com/r/thedaviddelta/lingva-translate) is available to ease the deployment using Compose, Kubernetes or similar technologies. Remember to also include the environment variable (simplified to `site_domain`) when running the container. -There's also an [official Docker image](https://hub.docker.com/r/thedaviddelta/lingva-translate) available for easing the deployment using Compose, Kubernetes or similar technologies. Remember to also include the environment variable (simplified to `site_domain`) when running the container. +#### Docker Compose: + +``` +version: '3' + +services: + + lingva: + container_name: lingva + image: thedaviddelta/lingva-translate:latest + restart: unless-stopped + environment: + - site_domain=lingva.ml + ports: + - 3000:3000 +``` + +#### Docker Run ```bash docker run -p 3000:3000 -e site_domain=lingva.ml thedaviddelta/lingva-translate:latest ``` +### Vercel + +Another easy way is to use the NextJS creators' own platform, [Vercel](https://vercel.com/), where you can deploy it for free with the following button. + +[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https%3A%2F%2Fgithub.com%2FTheDavidDelta%2Flingva-translate%2Ftree%2Fmain&env=NEXT_PUBLIC_SITE_DOMAIN&envDescription=Your%20domain) + ## Instances