This is a simple docker image for creating a nextjs container from a git repo, with support for SSH key authentication for cloning private repositories.
A script is supplied for generating a new SSH Key. Usage:
./generate-git-ssh-key.sh KEY_COMMENT
KEY_COMMENT needs to be the repo git url, e.g. [email protected]:Quphoria/nextjs-git-app.git
This will generate 2 files:
id_git: This is the private key that needs to get mounted to /id_git inside the containerid_git.pub: This is the public key that needs to get added to the deploy keys for the repositoryExample docker-compose.yml:
version: '3'
services:
nextjs_app:
container_name: nextjs_app
image: quphoria/nextjs-git-app
volumes:
- ./id_git:/id_git
- ./app:/app
environment:
- REPO_URL=[YOUR REPO URL]
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "1"
restart: unless-stopped
The container supports a healthcheck script (healthcheck.sh) at the root of the repository (/app), where a non-zero exit code signals an unhealthy container
Content type
Image
Digest
sha256:33b47fa96…
Size
39.7 MB
Last updated
10 months ago
docker pull quphoria/nextjs-git-app