Compare commits

...

3 Commits

Author SHA1 Message Date
6885dfbb38 Add the ability to run cpolis from docker 2025-01-19 15:17:38 +01:00
86a16629fd Change htmx version to @latest 2025-01-19 10:16:07 +01:00
6d402aca32 Update copyright notice 2025-01-19 10:13:18 +01:00
4 changed files with 37 additions and 4 deletions

11
Dockerfile Normal file
View File

@ -0,0 +1,11 @@
FROM golang:latest
RUN apk add --no-cache pandoc
WORKDIR /var/www/cpolis
COPY . .
RUN go build -o cpolis cmd/main.go
CMD ["./cpolis"]

View File

@ -51,8 +51,8 @@ func newConfig() *Config {
MaxImgWidth: 1920,
PDFDir: "/var/www/cpolis/pdfs",
PicsDir: "/var/www/cpolis/pics",
Port: ":8080",
Version: "v0.15.2",
Port: ":1664",
Version: "v0.16.0",
WebDir: "/var/www/cpolis/web",
}
}

22
docker-compose.yml Normal file
View File

@ -0,0 +1,22 @@
services:
app:
build: .
ports:
- "1664:1664"
volumes:
- /path/to/serviceAccountKey.json:/var/www/cpolis/serviceAccountKey.json
- /var/log/cpolis.log:/var/log/cpolis.log
depends_on:
- db
db:
image: mariadb:latest
environment:
MYSQL_ROOT_PASSWORD: example
MYSQL_DATABASE: cpolis
MYSQL_USER: exampleuser
MYSQL_PASSWORD: examplepass
ports:
- "3306:3306"
volumes:
- ./path/to/create_db.sql:/docker-entrypoint-initdb.d/create_db.sql

View File

@ -38,11 +38,11 @@
</main>
<footer class="text-center text-gray-500 my-8">
<p>&copy; 2024 Jason Streifling. Alle Rechte vorbehalten.</p>
<p>&copy; 2025 Jason Streifling. Alle Rechte vorbehalten.</p>
<p>{{.Version}} - <strong>Alpha: Drastische Änderungen und Fehler vorbehalten.</strong></p>
</footer>
<script src="https://unpkg.com/htmx.org@2.0.3"></script>
<script src="https://unpkg.com/htmx.org@latest"></script>
<script src="https://unpkg.com/easymde/dist/easymde.min.js"></script>
<script>
document.addEventListener('DOMContentLoaded', () => {