11import type { Metadata } from "next" ;
22import Image from "next/image" ;
3- import { CopyButton } from "./components/CopyButton " ;
3+ import InstallationComponent from "./components/InstallationComponent " ;
44
55export const metadata : Metadata = {
66 title : "Postgresus | PostgreSQL backup" ,
@@ -50,28 +50,6 @@ export const metadata: Metadata = {
5050} ;
5151
5252export default function Index ( ) {
53- const installScript = `sudo apt-get install -y curl && \\
54- sudo curl -sSL https://raw.githubusercontent.com/RostislavDugin/postgresus/refs/heads/main/install-postgresus.sh | sudo bash` ;
55-
56- const dockerRun = `docker run -d \\
57- --name postgresus \\
58- -p 4005:4005 \\
59- -v ./postgresus-data:/postgresus-data \\
60- --restart unless-stopped \\
61- rostislavdugin/postgresus:latest` ;
62-
63- const dockerCompose = `version: "3"
64-
65- services:
66- postgresus:
67- container_name: postgresus
68- image: rostislavdugin/postgresus:latest
69- ports:
70- - "4005:4005"
71- volumes:
72- - ./postgresus-data:/postgresus-data
73- restart: unless-stopped` ;
74-
7553 return (
7654 < >
7755 { /* JSON-LD Structured Data */ }
@@ -780,7 +758,7 @@ services:
780758 className = "flex justify-center py-[50px] md:py-[100px]"
781759 >
782760 < div className = "w-[320px] max-w-[320px] sm:w-[640px] sm:max-w-[640px] lg:w-[1200px] lg:max-w-[1200px]" >
783- < div className = "mb-10 md:mb-20 " >
761+ < div className = "mb-10 md:mb-10 " >
784762 < h2 className = "text-2xl font-bold sm:text-4xl" > How to install?</ h2 >
785763
786764 < p className = "mt-5 max-w-[550px] text-base sm:text-lg" >
@@ -789,116 +767,15 @@ services:
789767 </ p >
790768 </ div >
791769
792- < div className = "mt-20" >
793- < div className = "mb-16 block xl:flex" >
794- < div className = "w-full sm:pr-10 xl:w-1/2" >
795- < h3 className = "mb-3 text-xl font-bold md:text-2xl" >
796- Option 1: automated installation script (recommended)
797- </ h3 >
798-
799- < p className = "max-w-[500px] md:text-lg" >
800- The installation script will:
801- < br />
802- ✅ Install Docker with Docker Compose (if not already
803- installed)
804- < br />
805- ✅ Set up Postgresus
806- < br /> ✅ Configure automatic startup on system reboot
807- </ p >
808-
809- < div className = "relative mt-5 max-w-[550px]" >
810- < code className = "block w-full overflow-x-auto whitespace-nowrap rounded-lg bg-gray-100 p-4 pr-16 text-sm" >
811- sudo apt-get install -y curl && \
812- < br />
813- sudo curl -sSL
814- https://raw.githubusercontent.com/RostislavDugin/postgresus/refs/heads/main/install-postgresus.sh
815- \ | sudo bash
816- </ code >
817- < div className = "absolute right-2 top-2" >
818- < CopyButton text = { installScript } />
819- </ div >
820- </ div >
821- </ div >
822-
823- < div className = "mt-20 w-full sm:pr-10 xl:mt-0 xl:w-1/2" >
824- < h3 className = "mb-3 text-xl font-bold md:text-2xl" >
825- Option 2: simple Docker run
826- </ h3 >
827-
828- < p className = "max-w-[500px] md:text-lg" >
829- The easiest way to run Postgresus with embedded PostgreSQL.
830- This single command will:
831- < br />
832- ✅ Start Postgresus
833- < br />
834- ✅ Store all data in ./postgresus-data directory
835- < br /> ✅ Automatically restart on system reboot
836- </ p >
837-
838- < div className = "relative mt-5 max-w-[550px]" >
839- < code className = "block w-full overflow-x-auto whitespace-nowrap rounded-lg bg-gray-100 p-4 pr-16 text-sm" >
840- docker run -d \
841- < br />
842- --name postgresus \
843- < br />
844- -p 4005:4005 \
845- < br />
846- -v ./postgresus-data:/postgresus-data \
847- < br />
848- --restart unless-stopped \
849- < br />
850- rostislavdugin/postgresus:latest
851- </ code >
852- < div className = "absolute right-2 top-2" >
853- < CopyButton text = { dockerRun } />
854- </ div >
855- </ div >
856- </ div >
857- </ div >
858-
859- < div className = "block xl:flex" >
860- < div className = "w-full sm:pr-10" >
861- < h3 className = "mb-3 text-xl font-bold md:text-2xl" >
862- Option 3: Docker Compose setup
863- </ h3 >
864-
865- < p className = "max-w-[500px] md:text-lg" >
866- Create a docker-compose.yml file with the following
867- configuration, then run: < strong > docker compose up -d</ strong >
868- </ p >
770+ < InstallationComponent />
869771
870- < div className = "relative mt-5 max-w-[550px]" >
871- < code className = "block w-full overflow-x-auto whitespace-nowrap rounded-lg bg-gray-100 p-4 pr-16 text-sm" >
872- version: "3"
873- < br />
874- < br />
875- services:
876- < br />
877- postgresus:
878- < br />
879- container_name: postgresus
880- < br />
881- image:
882- rostislavdugin/postgresus:latest
883- < br />
884- ports:
885- < br />
886- - "4005:4005"
887- < br />
888- volumes:
889- < br />
890- -
891- ./postgresus-data:/postgresus-data
892- < br />
893- restart: unless-stopped
894- </ code >
895-
896- < div className = "absolute right-2 top-2" >
897- < CopyButton text = { dockerCompose } />
898- </ div >
899- </ div >
900- </ div >
901- </ div >
772+ < div className = "mt-4" >
773+ < a
774+ href = "/installation"
775+ className = "text-blue-600 hover:text-blue-700"
776+ >
777+ Read more about installation →
778+ </ a >
902779 </ div >
903780 </ div >
904781 </ div >
0 commit comments