mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
625ca8215e | ||
![]() |
9e735eb47e |
@@ -4,7 +4,3 @@ config*.yml
|
|||||||
*.db
|
*.db
|
||||||
*.exe
|
*.exe
|
||||||
wakapi
|
wakapi
|
||||||
Dockerfile
|
|
||||||
docker-compose.yml
|
|
||||||
.dockerignore
|
|
||||||
.git*
|
|
||||||
|
21
Dockerfile
21
Dockerfile
@@ -2,21 +2,12 @@
|
|||||||
|
|
||||||
FROM golang:1.15 AS build-env
|
FROM golang:1.15 AS build-env
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
|
|
||||||
ADD ./go.mod .
|
ADD ./go.mod .
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
|
|
||||||
ADD . .
|
ADD . .
|
||||||
RUN go build -o wakapi
|
RUN go build -o wakapi
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
RUN cp /src/wakapi . && \
|
|
||||||
cp /src/config.default.yml config.yml && \
|
|
||||||
sed -i 's/listen_ipv6: ::1/listen_ipv6: /g' config.yml && \
|
|
||||||
cp /src/version.txt . && \
|
|
||||||
cp -r /src/static /src/data /src/migrations /src/views . && \
|
|
||||||
cp /src/wait-for-it.sh .
|
|
||||||
|
|
||||||
# Run Stage
|
# Run Stage
|
||||||
|
|
||||||
# When running the application using `docker run`, you can pass environment variables
|
# When running the application using `docker run`, you can pass environment variables
|
||||||
@@ -36,7 +27,17 @@ ENV WAKAPI_PASSWORD_SALT ''
|
|||||||
ENV WAKAPI_LISTEN_IPV4 '0.0.0.0'
|
ENV WAKAPI_LISTEN_IPV4 '0.0.0.0'
|
||||||
ENV WAKAPI_INSECURE_COOKIES 'true'
|
ENV WAKAPI_INSECURE_COOKIES 'true'
|
||||||
|
|
||||||
COPY --from=build-env /app .
|
COPY --from=build-env /src/wakapi /app/
|
||||||
|
COPY --from=build-env /src/config.default.yml /app/config.yml
|
||||||
|
COPY --from=build-env /src/version.txt /app/
|
||||||
|
|
||||||
|
RUN sed -i 's/listen_ipv6: ::1/listen_ipv6: /g' /app/config.yml
|
||||||
|
|
||||||
|
ADD static /app/static
|
||||||
|
ADD data /app/data
|
||||||
|
ADD migrations /app/migrations
|
||||||
|
ADD views /app/views
|
||||||
|
ADD wait-for-it.sh .
|
||||||
|
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
|
|
||||||
|
@@ -43,7 +43,7 @@ func (s *Signup) IsValid() bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func validateUsername(username string) bool {
|
func validateUsername(username string) bool {
|
||||||
return len(username) >= 1 && username != "current"
|
return len(username) >= 3 && username != "current"
|
||||||
}
|
}
|
||||||
|
|
||||||
func validatePassword(password string) bool {
|
func validatePassword(password string) bool {
|
||||||
|
@@ -1 +1 @@
|
|||||||
1.18.2
|
1.18.1
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
<label class="inline-block text-sm mb-1 text-gray-500" for="username">Username</label>
|
<label class="inline-block text-sm mb-1 text-gray-500" for="username">Username</label>
|
||||||
<input class="shadow appearance-none bg-gray-800 focus:bg-gray-700 text-gray-300 border-green-700 focus:border-gray-500 border rounded w-full py-1 px-3"
|
<input class="shadow appearance-none bg-gray-800 focus:bg-gray-700 text-gray-300 border-green-700 focus:border-gray-500 border rounded w-full py-1 px-3"
|
||||||
type="text" id="username"
|
type="text" id="username"
|
||||||
name="username" placeholder="Enter your username" minlength="1" required autofocus>
|
name="username" placeholder="Enter your username" minlength="3" required autofocus>
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-8">
|
<div class="mb-8">
|
||||||
<label class="inline-block text-sm mb-1 text-gray-500" for="password">Password</label>
|
<label class="inline-block text-sm mb-1 text-gray-500" for="password">Password</label>
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
class="border-b border-green-700">WakaTime</a>
|
class="border-b border-green-700">WakaTime</a>
|
||||||
client tools.
|
client tools.
|
||||||
Please refer to <a href="https://github.com/muety/wakapi#-client-setup" target="_blank"
|
Please refer to <a href="https://github.com/muety/wakapi#client-setup" target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
class="border-b border-green-700">this readme section</a> for instructions.
|
class="border-b border-green-700">this readme section</a> for instructions.
|
||||||
You will be able to view you <strong>API Key</strong> once you log in.
|
You will be able to view you <strong>API Key</strong> once you log in.
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
<label class="inline-block text-sm mb-1 text-gray-500" for="username">Username</label>
|
<label class="inline-block text-sm mb-1 text-gray-500" for="username">Username</label>
|
||||||
<input class="shadow appearance-none bg-gray-800 focus:bg-gray-700 text-gray-300 border-green-700 focus:border-gray-500 border rounded w-full py-1 px-3"
|
<input class="shadow appearance-none bg-gray-800 focus:bg-gray-700 text-gray-300 border-green-700 focus:border-gray-500 border rounded w-full py-1 px-3"
|
||||||
type="text" id="username"
|
type="text" id="username"
|
||||||
name="username" placeholder="Choose a username" minlength="1" required autofocus>
|
name="username" placeholder="Choose a username" minlength="3" required autofocus>
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-8">
|
<div class="mb-8">
|
||||||
<label class="inline-block text-sm mb-1 text-gray-500" for="password">Password</label>
|
<label class="inline-block text-sm mb-1 text-gray-500" for="password">Password</label>
|
||||||
|
Reference in New Issue
Block a user