mirror of
https://github.com/airlabspl/uptimemonitor.git
synced 2025-08-14 12:19:19 +02:00
add docker files
This commit is contained in:
24
Dockerfile
Normal file
24
Dockerfile
Normal file
@@ -0,0 +1,24 @@
|
||||
FROM golang:latest AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN go mod download
|
||||
|
||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
|
||||
go build -o uptimemonitor \
|
||||
-ldflags "-X uptimemonitor/pkg/version.Version=$(git describe --tags)" \
|
||||
./cmd/uptimemonitor
|
||||
|
||||
FROM alpine:latest
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apk add --no-cache ca-certificates
|
||||
|
||||
COPY --from=builder /app/uptimemonitor .
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["./uptimemonitor"]
|
13
README.md
13
README.md
@@ -33,6 +33,9 @@ chmod +x uptimemonitor
|
||||
./uptimemonitor -addr=":3000"
|
||||
```
|
||||
|
||||
You can also use provided `Dockerfile` and `docker-compose.yml` for reference to
|
||||
run the app using Docker.
|
||||
|
||||
## First run
|
||||
|
||||
When you first run the application you will be asked to create a new account,
|
||||
@@ -85,3 +88,13 @@ small donation- please use Github Sponsors.
|
||||
|
||||
The donations of $50 a month and above will be featured in a sponsors area
|
||||
inside the application dashboard.
|
||||
|
||||
## Roadmap
|
||||
|
||||
- Monitor status badges
|
||||
- Change password
|
||||
- Manage users
|
||||
- Timezones
|
||||
- Reset password via cli
|
||||
- Add "Test Webhook" button with fake incident
|
||||
- Sort monitors option (with localstorage sync) by created_at/name(domain)
|
||||
|
29
TODO.md
29
TODO.md
@@ -1,29 +0,0 @@
|
||||
# TODO
|
||||
|
||||
What's left to do:
|
||||
|
||||
- [ ] Get app version from git tag
|
||||
- [ ] Add documentation
|
||||
- [ ] Document how to install
|
||||
- [ ] Document webhook parsing and available variables
|
||||
- [ ] Release 🎉
|
||||
|
||||
Optional:
|
||||
|
||||
- [ ] Monitor status
|
||||
- [ ] Change password
|
||||
- [ ] Add users
|
||||
- [ ] Remove users
|
||||
- [ ] Change user passwords
|
||||
- [ ] Timezones
|
||||
- [ ] Reset password via cli
|
||||
- [ ] Use the same form for creation and editing of monitor
|
||||
- [ ] Save check response
|
||||
- [ ] Add check response modal (div#modals + append when clicked + destroy when
|
||||
clicked)
|
||||
- [ ] Mobile breadcrumbs (dropdown/select)
|
||||
- [ ] Add "Test Webhook" button with fake incident
|
||||
- [ ] Sort monitors option (with localstorage sync) by created_at/name(domain)
|
||||
- [ ] Session expiration
|
||||
- [ ] Test check timeout
|
||||
- [ ] Loading placeholders (skeletons)
|
@@ -23,12 +23,16 @@ var (
|
||||
)
|
||||
|
||||
func main() {
|
||||
flag.StringVar(&dsn, "dsn", "uptimemonitor.sqlite?_journal_mode=WAL&_busy_timeout=5000&_synchronous=FULL&_txlock=immediate", "database server name")
|
||||
flag.StringVar(&dsn, "dsn", "data/uptimemonitor.sqlite?_journal_mode=WAL&_busy_timeout=5000&_synchronous=FULL&_txlock=immediate", "database server name")
|
||||
flag.StringVar(&addr, "addr", ":3000", "server address")
|
||||
flag.BoolVar(&secure, "secure", true, "use https")
|
||||
|
||||
flag.Parse()
|
||||
|
||||
if os.Getenv("SECURE") == "false" {
|
||||
secure = false
|
||||
}
|
||||
|
||||
store := store.New(dsn)
|
||||
service := service.New(store)
|
||||
handler := handler.New(store, service, secure)
|
||||
|
2
data/.gitignore
vendored
Normal file
2
data/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
17
docker-compose.yml
Normal file
17
docker-compose.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
# documentation: https://github.com/airlabspl/uptimemonitor/blob/master/README.md
|
||||
# slogan: A self-hosted, simple web uptime monitor
|
||||
# tags: uptime,downtime,monitor,self-hosted
|
||||
# logo: svgs/uptime-monitor-dev.svg
|
||||
# port: 3000
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
- SECURE=false
|
||||
ports:
|
||||
- "3000:3000"
|
||||
restart: always
|
||||
volumes:
|
||||
- ${COOLIFY_VOLUME_APP}:/app/data
|
Reference in New Issue
Block a user