Last active
January 22, 2022 10:12
-
-
Save alexgaribay/a35f57a15c3879e3952e83eae433c3ad to your computer and use it in GitHub Desktop.
One-click installer for Ghost on Caprover
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"captainVersion": "2", | |
"documentation": "Taken from https://docs.ghost.org/", | |
"displayName": "", | |
"description": "Ghost is a free and open source blogging platform written in JavaScript and distributed under the MIT License", | |
"dockerCompose": { | |
"services": { | |
"$$cap_appname": { | |
"depends_on": [ | |
"$$cap_appname-db" | |
], | |
"containerHttpPort": "2368", | |
"environment": { | |
"url": "$$cap_url", | |
"database__client": "mysql", | |
"database__connection__host": "srv-captain--$$cap_appname-db", | |
"database__connection__user": "ghost", | |
"database__connection__password": "$$cap_db_ghost_password", | |
"database__connection__database": "ghost" | |
}, | |
"dockerfileLines": [ | |
"FROM ghost:$$cap_ghost_version", | |
"RUN apt-get update && apt-get install wait-for-it", | |
"ENTRYPOINT [\"wait-for-it\", \"srv-captain--$$cap_appname-db:3306\", \"--\", \"docker-entrypoint.sh\"]", | |
"CMD [\"node\", \"current/index.js\"]" | |
], | |
"restart": "always", | |
"volumes": [ | |
"$$cap_appname-content:/var/lib/ghost/content" | |
] | |
}, | |
"$$cap_appname-db": { | |
"environment": { | |
"MYSQL_ROOT_PASSWORD": "$$cap_db_password", | |
"MYSQL_DATABASE": "ghost", | |
"MYSQL_USER": "ghost", | |
"MYSQL_PASSWORD": "$$cap_db_ghost_password" | |
}, | |
"notExposeAsWebApp": "true", | |
"image": "mysql:5.7.30", | |
"restart": "always", | |
"volumes": [ | |
"$$cap_appname-mysql-data:/var/lib/mysql" | |
] | |
} | |
}, | |
"version": "2.1", | |
"volumes": { | |
"$$cap_appname-content": {}, | |
"$$cap_appname-mysql-data": {} | |
} | |
}, | |
"instructions": { | |
"end": "Ghost is deployed and available as $$cap_appname. \n\n IMPORTANT: It will take up to 2 minutes for Ghost to be ready. Before that, you might see 502 error page.\n", | |
"start": "Ghost is a fully open source, adaptable platform for building and running a modern online publication. We power blogs, magazines and journalists from Zappos to Sky News." | |
}, | |
"variables": [ | |
{ | |
"defaultValue": "2.16.4", | |
"description": "Check out their Docker page for the valid tags https://hub.docker.com/_/ghost/tags", | |
"id": "$$cap_ghost_version", | |
"label": "Ghost Version", | |
"validRegex": "/^([^\\s^\\/])+$/" | |
}, | |
{ | |
"description": "Blog's public URL", | |
"id": "$$cap_url", | |
"label": "Blog URL", | |
"validRegex": "/.+/" | |
}, | |
{ | |
"description": "Root password that will be created on MySQL", | |
"id": "$$cap_db_password", | |
"label": "MySQL root password", | |
"validRegex": "/^(?=.*\\d).{10,}$/" | |
}, | |
{ | |
"description": "Password for database user named `ghost`", | |
"id": "$$cap_db_ghost_password", | |
"label": "MySQL Ghost user password", | |
"validRegex": "/^(?=.*\\d).{10,}$/" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment