Skip to content

Commit 8695dce

Browse files
authored
Merge pull request #6 from Sammyjo20/feature/storage-directory-volume
Various Improvements
2 parents b9a26e1 + 7b9c5b8 commit 8695dce

File tree

4 files changed

+21
-4
lines changed

4 files changed

+21
-4
lines changed

.github/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,15 @@ This will run the SSH server in your terminal window. In another window, you sho
8787
ssh localhost -p 2201
8888
```
8989

90+
### Installing additional PHP extensions
91+
You may need to add additional extensions to get your server to work in production. You can do
92+
this by modifying the `Dockerfile` in the root directory. The base image runs Alpine Linux and
93+
has a few common PHP extensions, however you can add more here if you need.
94+
95+
```
96+
RUN apk add php-redis
97+
```
98+
9099
## Deploying to production
91100

92101
### Requirements

Dockerfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ FROM sammyjo20/ssh-php:latest
44

55
USER root
66

7+
# You can add any additional PHP extensions by using `RUN apk add [extensions]`.
8+
9+
# RUN apk add php-redis
10+
11+
# --------------------------------------
12+
713
# Copy all files
814

915
COPY ./src ./src
@@ -27,4 +33,4 @@ USER server
2733

2834
# Run Composer install without dependencies
2935

30-
RUN composer install --no-dev --no-interaction --prefer-dist --optimize-autoloader --ignore-platform-reqs
36+
RUN composer install --no-dev --no-interaction --prefer-dist --optimize-autoloader

docker-compose.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
services:
22
server:
3-
# platform: linux/amd64 # Change to linux/arm/v7 for Raspberry Pi (or v8 etc)
43
build:
54
context: .
65
volumes:
76
- ssh-php-ssh:/home/server/.ssh
87
ports:
98
- 2201:22 # Change to 22:22 if you don't have an SSH server running already
10-
restart: unless-stopped
9+
restart: always
1110
logging:
1211
driver: "json-file"
1312
options:

src/app/Renderers/HomeRenderer.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,12 @@ public function __invoke(App $app): static
2828
'',
2929
'Welcome to SSH-PHP, ' . $name . '!',
3030
'',
31+
'🔗 https://github.com/sammyjo20/ssh-php',
32+
'',
33+
'',
3134
'❤️',
3235
'',
33-
'Support the project https://github.com/sponsors/Sammyjo20',
36+
'Support the project https://github.com/sponsors/sammyjo20',
3437
];
3538

3639
$this->center($lines, $width, $height)

0 commit comments

Comments
 (0)