generated from coop-cloud/example
switched to key-based auth for SSH, added docs
Some checks failed
continuous-integration/drone/pr Build is failing
Some checks failed
continuous-integration/drone/pr Build is failing
This commit is contained in:
parent
29c4030009
commit
ba1c22690b
@ -29,5 +29,4 @@ COMPOSE_FILE="compose.yml"
|
|||||||
|
|
||||||
# Enable an SSH server to allow SFTP uploads to the web root
|
# Enable an SSH server to allow SFTP uploads to the web root
|
||||||
#COMPOSE_FILE="$COMPOSE_FILE:compose.sftp.yml"
|
#COMPOSE_FILE="$COMPOSE_FILE:compose.sftp.yml"
|
||||||
#SECRET_SSH_PASSWORD_VERSION=v1
|
#PUBLIC_KEY="ssh-ed25519 AAAAC3NzaJ1lZDI1NTE5AAAAIXqf4nxUxuGmLOaxXXXXXXXXoM/GwhcrAgmtbgXToaYmCJ user@host" # Replace with a public key you generate
|
||||||
#SSH_PORT="2222" # this doesn't work yet, maybe an abra bug?
|
|
15
README.md
15
README.md
@ -28,5 +28,20 @@ Custom HTML website, served using Nginx.
|
|||||||
abra app cp YOURAPPDOMAIN index.html app:/usr/share/nginx/html
|
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
|
[`abra`]: https://git.autonomic.zone/autonomic-cooperative/abra
|
||||||
[`coop-cloud/traefik`]: https://git.autonomic.zone/coop-cloud/traefik
|
[`coop-cloud/traefik`]: https://git.autonomic.zone/coop-cloud/traefik
|
||||||
|
@ -8,11 +8,8 @@ services:
|
|||||||
- PUID=1000
|
- PUID=1000
|
||||||
- PGID=1000
|
- PGID=1000
|
||||||
- TZ=Etc/UTC
|
- TZ=Etc/UTC
|
||||||
- PASSWORD_ACCESS=true
|
|
||||||
- USER_PASSWORD_FILE=/run/secrets/ssh_password
|
|
||||||
- USER_NAME=sftp
|
- USER_NAME=sftp
|
||||||
secrets:
|
- PUBLIC_KEY
|
||||||
- ssh_password
|
|
||||||
volumes:
|
volumes:
|
||||||
- content:/content:rw
|
- content:/content:rw
|
||||||
ports:
|
ports:
|
||||||
@ -36,11 +33,6 @@ services:
|
|||||||
- content:/content:rw
|
- content:/content:rw
|
||||||
entrypoint: [ "bash", "-c", "sleep 10 && chown -R 1000:1000 /content"]
|
entrypoint: [ "bash", "-c", "sleep 10 && chown -R 1000:1000 /content"]
|
||||||
|
|
||||||
secrets:
|
|
||||||
ssh_password:
|
|
||||||
external: true
|
|
||||||
name: ${STACK_NAME}_ssh_password_${SECRET_SSH_PASSWORD_VERSION}
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
content:
|
content:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user