Skip to content

Commit ed4d900

Browse files
committed
move static folder
1 parent e5fdd91 commit ed4d900

16 files changed

+17
-12
lines changed

.dockerignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ makefile
44
.gitea/
55
bin/
66
sample.*
7-
db/
7+
db/
8+
.env
9+
static/qrcodes/

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@ Prerequisites:
2626
mkdir rssnotes
2727
cd rssnotes
2828
```
29-
2. Create a folder called `db`.
30-
29+
2. Create two folders: `db` and `qrcodes`.
30+
```bash
31+
mkdir db
32+
mkdir qrcodes
33+
```
3134
3. Create a file called `logfile.log`.
3235

3336
4. Create a file called `docker-compose.yml`.
@@ -50,9 +53,7 @@ cd rssnotes
5053

5154
11. Copy and paste the contents from the [sample.seedrelays.json](https://github.com/trinidz/rssnotes/blob/main/sample.seedrelays.json) file into your `seedrelays.json` file. Save and exit the file.
5255

53-
12. Run `docker-compose up -d` while in the `rssnotes` directory. This will start the rssnotes container in the background.
54-
55-
12. Go to http://localhost:3334 in your browser.
56+
12. Run `docker-compose up -d` while in the `rssnotes` directory. This will start the rssnotes container in the background. Go to http://localhost:3334 in your browser.
5657

5758
## Run the relay as a service on your system
5859
1. Clone the repo and cd into the repo folder.

dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,15 @@ ENV LOGFILE_PATH="/app/logfile.log"
2626
ENV FRENSDATA_PATH="/app/users.json"
2727
ENV SEED_RELAYS_PATH="/app/seedrelays.json"
2828
ENV TEMPLATE_PATH="/app/templates"
29-
ENV STATIC_PATH="/app/templates/static"
30-
ENV QRCODE_PATH="/app/templates/static/qrcodes"
29+
ENV STATIC_PATH="/app/static"
30+
ENV QRCODE_PATH="/app/static/qrcodes"
3131

3232
# Copy Go binary
3333
COPY --from=gobuilder /app/rssnotes /app/
3434

3535
# Copy any necessary files like templates, static assets, etc.
3636
COPY --from=gobuilder /app/templates /app/templates
37+
COPY --from=gobuilder /app/static /app/static
3738

3839
# Run the application
3940
CMD ["/app/rssnotes"]

main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ type Settings struct {
4040
SeedRelaysPath string `envconfig:"SEED_RELAYS_PATH" default:"./seedrelays.json"`
4141
LogfilePath string `envconfig:"LOGFILE_PATH" default:"./logfile.log"`
4242
TemplatePath string `envconfig:"TEMPLATE_PATH" default:"./templates"`
43-
StaticPath string `envconfig:"STATIC_PATH" default:"./templates/static"`
44-
QRCodePath string `envconfig:"QRCODE_PATH" default:"./templates/static/qrcodes"`
43+
StaticPath string `envconfig:"STATIC_PATH" default:"./static"`
44+
QRCodePath string `envconfig:"QRCODE_PATH" default:"./static/qrcodes"`
4545

4646
RsslayTagKey string `envconfig:"RSSLAY_TAG_KEY" default:"rsslay"`
4747
DefaultProfilePicUrl string `envconfig:"DEFAULT_PROFILE_PICTURE_URL" default:"https://i.imgur.com/MaceU96.png"`

sample.docker-compose.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ services:
55

66
volumes:
77
- "./.env:/.env"
8-
- "./logfile.log:/app/logfile.log"
98
- "./db:/app/db"
9+
- "./qrcodes:/app/static/qrcodes"
10+
- "./logfile.log:/app/logfile.log"
1011
- "./seedrelays.json:/app/seedrelays.json:ro"
1112

1213
ports:

sample.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ RELAY_NAME="my-rssnotes-relay"
99
#RELAY_DESCRIPTION="A relay for rss notes."
1010
#RELAY_CONTACT="email@example.com"
1111
#RELAY_ICON="https://fileserver.exapmle.com/icon.png"
12-
#PORT="3334"
12+
#PORT="3334"
1313
#MAX_NOTE_AGE_DAYS="90" #notes older than this many days will be deleted, disabled by default or if set to "0"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)