Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App Submission: Samba #1161

Merged
merged 14 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added samba/data/public/favicon.ico
Binary file not shown.
333 changes: 333 additions & 0 deletions samba/data/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,333 @@
<!doctype html>
<html>

<head>
<title>Samba</title>
<style>
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
html {
line-height: 1.15;
-webkit-text-size-adjust: 100%
}

body {
margin: 0
}

main {
display: block
}

h1 {
font-size: 2em;
margin: .67em 0
}

hr {
box-sizing: content-box;
height: 0;
overflow: visible
}

pre {
font-family: monospace, monospace;
font-size: 1em
}

a {
background-color: transparent
}

abbr[title] {
border-bottom: none;
text-decoration: underline;
text-decoration: underline dotted
}

b,
strong {
font-weight: bolder
}

code,
kbd,
samp {
font-family: monospace, monospace;
font-size: 1em
}

small {
font-size: 80%
}

sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline
}

sub {
bottom: -.25em
}

sup {
top: -.5em
}

img {
border-style: none
}

button,
input,
optgroup,
select,
textarea {
font-family: inherit;
font-size: 100%;
line-height: 1.15;
margin: 0
}

button,
input {
overflow: visible
}

button,
select {
text-transform: none
}

[type=button],
[type=reset],
[type=submit],
button {
-webkit-appearance: button
}

[type=button]::-moz-focus-inner,
[type=reset]::-moz-focus-inner,
[type=submit]::-moz-focus-inner,
button::-moz-focus-inner {
border-style: none;
padding: 0
}

[type=button]:-moz-focusring,
[type=reset]:-moz-focusring,
[type=submit]:-moz-focusring,
button:-moz-focusring {
outline: 1px dotted ButtonText
}

fieldset {
padding: .35em .75em .625em
}

legend {
box-sizing: border-box;
color: inherit;
display: table;
max-width: 100%;
padding: 0;
white-space: normal
}

progress {
vertical-align: baseline
}

textarea {
overflow: auto
}

[type=checkbox],
[type=radio] {
box-sizing: border-box;
padding: 0
}

[type=number]::-webkit-inner-spin-button,
[type=number]::-webkit-outer-spin-button {
height: auto
}

[type=search] {
-webkit-appearance: textfield;
outline-offset: -2px
}

[type=search]::-webkit-search-decoration {
-webkit-appearance: none
}

::-webkit-file-upload-button {
-webkit-appearance: button;
font: inherit
}

details {
display: block
}

summary {
display: list-item
}

template {
display: none
}

[hidden] {
display: none
}
</style>
<style>
body {
background-color: #1D1B1B;
font-family: system-ui, -apple-system, BlinkMacSystemFont, Roboto, Helvetica Neue, Segoe UI, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
color: #fff;
}

*,
h1,
h2,
h3,
h4,
h5,
h6,
p,
span {
color: #fff;
font-size: 20px;
font-weight: normal;
}

.success {
color: #63FB72;
}

.text-muted {
opacity: 0.8;
}

.text-small {
font-size: 14px;
}

hr {
width: 100%;
height: 2px;
background: #2F2C2C;
border: none;
margin: 40px 0;
}

.container {
padding: 40px;
max-width: 1440px;
margin: auto;
}

.app-icon {
border-radius: 20px;
}

.app {
display: flex;
margin: 20px 0 40px 0;
}

.app>.app-icon {
flex-shrink: 0;
height: 140px;
width: 140px;
box-shadow: 0 0 40px 0 rgba(0, 0, 0, 0.95);
margin-right: 24px;
}

.app>.app-details>.app-status {
display: block;
font-size: 20px;
margin: 10px 0 0 0;
}

.app>.app-details>.app-name {
font-size: 52px;
line-height: 52px;
font-weight: bold;
margin: 10px 0 0 0;
}
</style>
<link rel="shortcut icon" type="image/jpg" href="favicon.ico" />
</head>

<body>
<section class="container app-container">
<div class="app">
<img class="app-icon" src="samba.svg" width="256" height="256" />
<div class="app-details">
<span class="app-status success">&#9679; Running</span>
<h1 class="app-name">Samba</h1>
</div>
</div>
<p class="text-muted">
<hr />
<h2>How to Connect to the Umbrel SMB Server</h2>
<p>Follow these steps to connect to the Umbrel SMB Server:</p>

<h3>For Windows Users</h3>
<ol>
<li>Open <strong>File Explorer</strong>.</li>
<li>In the address bar, type <code>\\umbrel.local</code> and press <strong>Enter</strong>.</li>
<li>When prompted, enter the your credentials (check Umbrel dashboard -> Samba -> Right-Click -> Show
default
credentials).
</li>
<li>You should now see all of your umbrelOS data like downloads, movies, music, etc...</li>
</ol>

<h3>For macOS Users</h3>
<ol>
<li>Open <strong>Finder</strong>.</li>
<li>In the menu bar, click on <strong>Go</strong> and then select <strong>Connect to Server...</strong>.
</li>
<li>In the Server Address field, type <code>smb://umbrel.local</code> and click
<strong>Connect</strong>.
</li>
<li>When prompted, enter the your credentials (check Umbrel dashboard -> Samba -> Right-Click -> Show
default
credentials).
</li>
<li>You should now see all of your umbrelOS data like downloads, movies, music, etc...</li>
</ol>

<h3>For Linux Users</h3>
<ol>
<li>Open a file manager (such as <strong>Nautilus</strong> or <strong>Dolphin</strong>).</li>
<li>In the address bar, type <code>smb://umbrel.local</code> and press <strong>Enter</strong>.</li>
<li>When prompted, enter the your credentials (check Umbrel dashboard -> Samba -> Right-Click -> Show
default
credentials).
</li>
<li>You should now see all of your umbrelOS data like downloads, movies, music, etc...</li>
</ol>

<p>If you encounter any issues, make sure that the Umbrel SMB Server is running and that you have the
correct
permissions to access it. Additionally, ensure that your firewall or antivirus software is not blocking
the
connection.</p>

<p>For more detailed configuration information, <a href="smb.conf">click here to check your config file</a>.
You can change the config by opening the terminal (Settings -> Advanced Settings -> Terminal) and manually
modifying the smb file (e.g. with nano umbrel/app-data/samba/data/smb.conf).
</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we decide to leave out the smb.conf altogether, we should change this description and tell users to edit the docker-compose.yml directly in order to add a custom smb.conf file.

</p>
</section>
</body>

</html>
10 changes: 10 additions & 0 deletions samba/data/public/samba.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions samba/data/samba/smb.conf
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have checked the default smb.conf in the container and it seems like the only difference is the force user and force group keys. Both of which can set by environment variables. The only reason I can think of to keep this file then in the repository, is to allow advanced users to edit this file. I am not sure, maybe we can remove this file altogether and tell advanced users to modify the docker-compose.yml directly.

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[global]
security = user
server min protocol = SMB2

# disable printing services
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes

[storage]
path = /storage
comment = Shared
valid users = @smb
browseable = yes
writable = yes
read only = no
force user = umbrel
force group = smb
31 changes: 31 additions & 0 deletions samba/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
version: '3.7'

services:
app_proxy:
environment:
APP_HOST: samba_homepage_1
APP_PORT: 80

homepage:
image: joseluisq/static-web-server:2.32.0@sha256:c8345c2c469ba249cbc986b6155dc275ce86bcd30e0b29755fda4deb501bbddd
restart: on-failure
user: "1000:1000"
environment:
- SERVER_ROOT=/var/public
volumes:
- ${APP_DATA_DIR}/data/public:/var/public
- ${APP_DATA_DIR}/data/samba/smb.conf:/var/public/smb.conf:ro

server:
image: dockurr/samba:4.20.1@sha256:9a57887c0be1242ee2e1381653619a656820e1aee8e271885662d04c2c367be8
restart: on-failure
environment:
USER: umbrel
PASS: ${APP_PASSWORD}
UID: 1000
GID: 1000
ports:
- '446:445'
volumes:
- ${APP_DATA_DIR}/data/samba/smb.conf:/etc/samba/smb.conf
- ${UMBREL_ROOT}/data/storage:/storage
Loading