forked from coop-cloud/custom-html
48 lines
1.7 KiB
Markdown
48 lines
1.7 KiB
Markdown
# Custom HTML
|
|
|
|
[](https://build.coopcloud.tech/coop-cloud/custom-html)
|
|
|
|
Custom HTML website, served using Nginx.
|
|
|
|
<!-- metadata -->
|
|
* **Category**: Development
|
|
* **Status**: 2, beta
|
|
* **Image**: [`nginx`](https://hub.docker.com/_/nginx), 4, upstream
|
|
* **Healthcheck**: No
|
|
* **Backups**: No
|
|
* **Email**: N/A
|
|
* **Tests**: 2
|
|
* **SSO**: No
|
|
<!-- endmetadata -->
|
|
|
|
## Basic usage
|
|
|
|
1. Set up Docker Swarm and [`abra`]
|
|
2. Deploy [`coop-cloud/traefik`]
|
|
3. `abra app new custom-html`
|
|
4. `abra app config YOURAPPDOMAIN` - be sure to change `$DOMAIN` to something that resolves to
|
|
your Docker swarm box
|
|
5. `abra app deploy YOURAPPDOMAIN`
|
|
6. Copy your files to the container, using something like
|
|
```
|
|
abra app cp YOURAPPDOMAIN index.html app:/usr/share/nginx/html
|
|
```
|
|
|
|
## Allowing upload via SSH/SFTP
|
|
To allow management of your site's files using scp, rsync or other SSH-based tools:
|
|
1. If you don't already have one, generate an SSH keypair using `ssh-keygen`
|
|
1. `abra app config YOURAPPDOMAIN`
|
|
2. Uncomment these lines and add your public key:
|
|
```
|
|
#COMPOSE_FILE="$COMPOSE_FILE:compose.sftp.yml"
|
|
#PUBLIC_KEY="ssh-ed25519 AAAAC3NzaJ1lZDI1NTE5AAAAIXqf4nxUxuGmLOaxXXXXXXXXoM/GwhcrAgmtbgXToaYmCJ user@host" # Replace with a public key you generate
|
|
```
|
|
3. `abra app undeploy YOURAPPDOMAIN`
|
|
3. `abra app deploy YOURAPPDOMAIN`
|
|
4. Test the SSH connection: `ssh -p 2220 sftp@YOURAPPDOMAIN`
|
|
5. You can copy local files into the server's web root with a command like: `scp -r -P 2220 * sftp@YOURAPPDOMAIN:/content`
|
|
|
|
|
|
[`abra`]: https://git.autonomic.zone/autonomic-cooperative/abra
|
|
[`coop-cloud/traefik`]: https://git.autonomic.zone/coop-cloud/traefik
|