Changes: Switched Images to URLS, changed MariaDB Container to a Webserver container
|
@ -20,7 +20,7 @@ WORKDIR /app
|
|||
COPY --from=builder /git/build /app
|
||||
|
||||
# Caddyfile-Konfiguration, um Dateien aus /web zu bedienen
|
||||
RUN echo -e ":80 {\n root * /web\n file_server\n}" > /etc/caddy/Caddyfile
|
||||
RUN echo -e ":80 {\n root * /app\n try_files {path}.html {path}\n file_server\n}" > /etc/caddy/Caddyfile
|
||||
|
||||
# Macht Port 80 frei
|
||||
EXPOSE 80
|
||||
|
|
4
Justfile
|
@ -2,7 +2,7 @@
|
|||
set dotenv-load
|
||||
|
||||
# Default variables
|
||||
default_image := 'gitpot.dev/logolicusz/explorecraft_logolcicusz_knockoff:latest'
|
||||
default_image := 'gitpot.org/logolicusz/explorecraft_logolcicusz_knockoff:latest'
|
||||
default_tag := 'latest'
|
||||
|
||||
alias dewit := build
|
||||
|
@ -26,7 +26,7 @@ preview: _install
|
|||
|
||||
# Publish container to Gitpot registry
|
||||
publish image=default_image:
|
||||
echo "$GITPOT_TOKEN" | docker login gitpot.dev -u $GITPOT_USERNAME --password-stdin
|
||||
echo "$GITPOT_TOKEN" | docker login gitpot.org -u $GITPOT_USERNAME --password-stdin
|
||||
docker push {{image}}
|
||||
@echo "Published {{image}} successfuly! Use 'docker pull {{image}}' to pull the container."
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
services:
|
||||
web:
|
||||
image: gitpot.dev/logolicusz/explorecraft_logolcicusz_knockoff:${TAG}
|
||||
image: gitpot.org/logolicusz/explorecraft_logolcicusz_knockoff:${TAG}
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
|
|
|
@ -1,29 +1,25 @@
|
|||
services:
|
||||
db:
|
||||
container_name: mariadb
|
||||
image: mariadb:10.5.8
|
||||
pics:
|
||||
container_name: image-web
|
||||
image: caddy:2
|
||||
volumes:
|
||||
- picture_volume:/var/lib/mysql
|
||||
- /Users/logolicusz/Git/m169-weekly/scripts/init.sql:/docker-entrypoint-initdb.d/init.sql
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: rootpassword
|
||||
MYSQL_DATABASE: picture_db
|
||||
MYSQL_USER: user
|
||||
MYSQL_PASSWORD: userpassword
|
||||
command: --default-authentication-plugin=mysql_native_password
|
||||
- ./docker-data/pictures:/usr/share/caddy:ro
|
||||
- caddy-data:/data
|
||||
ports:
|
||||
- "3001:80"
|
||||
networks:
|
||||
- internal-bridge
|
||||
|
||||
web:
|
||||
image: gitpot.dev/logolicusz/explorecraft_logolcicusz_knockoff:latest
|
||||
image: gitpot.org/logolicusz/explorecraft_logolcicusz_knockoff:latest
|
||||
container_name: website
|
||||
ports:
|
||||
- "3000:80"
|
||||
networks:
|
||||
- internal-bridge
|
||||
|
||||
volumes:
|
||||
picture_volume:
|
||||
external: true
|
||||
caddy-data:
|
||||
|
||||
networks:
|
||||
internal-bridge:
|
||||
|
|
1
docker-data/caddy-data/caddy/last_clean.json
Normal file
|
@ -0,0 +1 @@
|
|||
{"tls":{"timestamp":"2024-04-12T06:59:35.470719011Z","instance_id":"26cce6f0-a3cb-45a7-b088-15bb6a9cbada"}}
|
Before Width: | Height: | Size: 709 KiB After Width: | Height: | Size: 709 KiB |
Before Width: | Height: | Size: 1,014 KiB After Width: | Height: | Size: 1,014 KiB |
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 1.8 MiB |
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 1.3 MiB |
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 1.7 MiB |
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 1.8 MiB |
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 1.7 MiB |
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 1.8 MiB |
7
init.sql
|
@ -1,7 +0,0 @@
|
|||
CREATE DATABASE IF NOT EXISTS picture_db;
|
||||
USE picture_db;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS pictures (
|
||||
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||
url VARCHAR(255) NOT NULL
|
||||
);
|
|
@ -9,21 +9,21 @@
|
|||
</div>
|
||||
|
||||
<div class="grid">
|
||||
<div><img class="gallery-image" src="assets/images/gallery/pic1.png" alt="pic1"></div>
|
||||
<div><img class="gallery-image" src="assets/images/gallery/pic2.png" alt="pic2"></div>
|
||||
<div><img class="gallery-image" src="assets/images/gallery/pic3.png" alt="pic3"></div>
|
||||
<div><img class="gallery-image" src="http://localhost:3001/pic1.png" alt="pic1"></div>
|
||||
<div><img class="gallery-image" src="http://localhost:3001/pic2.png" alt="pic2"></div>
|
||||
<div><img class="gallery-image" src="http://localhost:3001/pic3.png" alt="pic3"></div>
|
||||
</div>
|
||||
<div class="grid">
|
||||
<div><img class="gallery-image" src="assets/images/gallery/pic5.png" alt="pic6"></div>
|
||||
<div><img class="gallery-image" src="assets/images/gallery/pic6.png" alt="pic7"></div>
|
||||
<div><img class="gallery-image" src="assets/images/gallery/pic3.png" alt="pic3"></div>
|
||||
<div><img class="gallery-image" src="assets/images/gallery/pic4.png" alt="pic5"></div>
|
||||
<div><img class="gallery-image" src="http://localhost:3001/pic4.png" alt="pic6"></div>
|
||||
<div><img class="gallery-image" src="http://localhost:3001/pic5.png" alt="pic7"></div>
|
||||
<div><img class="gallery-image" src="http://localhost:3001/pic6.png" alt="pic3"></div>
|
||||
<div><img class="gallery-image" src="http://localhost:3001/pic7.png" alt="pic5"></div>
|
||||
</div>
|
||||
<div class="grid">
|
||||
<div><img class="gallery-image" src="assets/images/gallery/pic7.png" alt="pic8"></div>
|
||||
<div><img class="gallery-image" src="assets/images/gallery/pic8.png" alt="pic9"></div>
|
||||
<div><img class="gallery-image" src="assets/images/gallery/pic10.png" alt="pic10"></div>
|
||||
<div><img class="gallery-image" src="assets/images/gallery/pic9.png" alt="pic4"></div>
|
||||
<div><img class="gallery-image" src="http://localhost:3001/pic8.png" alt="pic8"></div>
|
||||
<div><img class="gallery-image" src="http://localhost:3001/pic9.png" alt="pic9"></div>
|
||||
<div><img class="gallery-image" src="http://localhost:3001/pic10.png" alt="pic10"></div>
|
||||
<div><img class="gallery-image" src="http://localhost:3001/pic1.png" alt="pic4"></div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
|
|