Changes: Switched Images to URLS, changed MariaDB Container to a Webserver container

This commit is contained in:
LogolicusZ 2024-04-12 10:46:48 +02:00
parent 2065e06e4d
commit 45ceecee0a
17 changed files with 26 additions and 36 deletions

View file

@ -20,7 +20,7 @@ WORKDIR /app
COPY --from=builder /git/build /app COPY --from=builder /git/build /app
# Caddyfile-Konfiguration, um Dateien aus /web zu bedienen # 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 # Macht Port 80 frei
EXPOSE 80 EXPOSE 80

View file

@ -2,7 +2,7 @@
set dotenv-load set dotenv-load
# Default variables # Default variables
default_image := 'gitpot.dev/logolicusz/explorecraft_logolcicusz_knockoff:latest' default_image := 'gitpot.org/logolicusz/explorecraft_logolcicusz_knockoff:latest'
default_tag := 'latest' default_tag := 'latest'
alias dewit := build alias dewit := build
@ -26,7 +26,7 @@ preview: _install
# Publish container to Gitpot registry # Publish container to Gitpot registry
publish image=default_image: 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}} docker push {{image}}
@echo "Published {{image}} successfuly! Use 'docker pull {{image}}' to pull the container." @echo "Published {{image}} successfuly! Use 'docker pull {{image}}' to pull the container."

View file

@ -1,6 +1,6 @@
services: services:
web: web:
image: gitpot.dev/logolicusz/explorecraft_logolcicusz_knockoff:${TAG} image: gitpot.org/logolicusz/explorecraft_logolcicusz_knockoff:${TAG}
build: build:
context: . context: .
dockerfile: Dockerfile dockerfile: Dockerfile

View file

@ -1,29 +1,25 @@
services: services:
db: pics:
container_name: mariadb container_name: image-web
image: mariadb:10.5.8 image: caddy:2
volumes: volumes:
- picture_volume:/var/lib/mysql - ./docker-data/pictures:/usr/share/caddy:ro
- /Users/logolicusz/Git/m169-weekly/scripts/init.sql:/docker-entrypoint-initdb.d/init.sql - caddy-data:/data
environment: ports:
MYSQL_ROOT_PASSWORD: rootpassword - "3001:80"
MYSQL_DATABASE: picture_db
MYSQL_USER: user
MYSQL_PASSWORD: userpassword
command: --default-authentication-plugin=mysql_native_password
networks: networks:
- internal-bridge - internal-bridge
web: web:
image: gitpot.dev/logolicusz/explorecraft_logolcicusz_knockoff:latest image: gitpot.org/logolicusz/explorecraft_logolcicusz_knockoff:latest
container_name: website
ports: ports:
- "3000:80" - "3000:80"
networks: networks:
- internal-bridge - internal-bridge
volumes: volumes:
picture_volume: caddy-data:
external: true
networks: networks:
internal-bridge: internal-bridge:

View file

@ -0,0 +1 @@
{"tls":{"timestamp":"2024-04-12T06:59:35.470719011Z","instance_id":"26cce6f0-a3cb-45a7-b088-15bb6a9cbada"}}

View file

Before

Width:  |  Height:  |  Size: 709 KiB

After

Width:  |  Height:  |  Size: 709 KiB

View file

Before

Width:  |  Height:  |  Size: 1,014 KiB

After

Width:  |  Height:  |  Size: 1,014 KiB

View file

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

View file

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

View file

Before

Width:  |  Height:  |  Size: 1.8 MiB

After

Width:  |  Height:  |  Size: 1.8 MiB

View file

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

View file

Before

Width:  |  Height:  |  Size: 1.7 MiB

After

Width:  |  Height:  |  Size: 1.7 MiB

View file

Before

Width:  |  Height:  |  Size: 1.8 MiB

After

Width:  |  Height:  |  Size: 1.8 MiB

View file

Before

Width:  |  Height:  |  Size: 1.7 MiB

After

Width:  |  Height:  |  Size: 1.7 MiB

View file

Before

Width:  |  Height:  |  Size: 1.8 MiB

After

Width:  |  Height:  |  Size: 1.8 MiB

View file

@ -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
);

View file

@ -9,21 +9,21 @@
</div> </div>
<div class="grid"> <div class="grid">
<div><img class="gallery-image" src="assets/images/gallery/pic1.png" alt="pic1"></div> <div><img class="gallery-image" src="http://localhost:3001/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="http://localhost:3001/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/pic3.png" alt="pic3"></div>
</div> </div>
<div class="grid"> <div class="grid">
<div><img class="gallery-image" src="assets/images/gallery/pic5.png" alt="pic6"></div> <div><img class="gallery-image" src="http://localhost:3001/pic4.png" alt="pic6"></div>
<div><img class="gallery-image" src="assets/images/gallery/pic6.png" alt="pic7"></div> <div><img class="gallery-image" src="http://localhost:3001/pic5.png" alt="pic7"></div>
<div><img class="gallery-image" src="assets/images/gallery/pic3.png" alt="pic3"></div> <div><img class="gallery-image" src="http://localhost:3001/pic6.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/pic7.png" alt="pic5"></div>
</div> </div>
<div class="grid"> <div class="grid">
<div><img class="gallery-image" src="assets/images/gallery/pic7.png" alt="pic8"></div> <div><img class="gallery-image" src="http://localhost:3001/pic8.png" alt="pic8"></div>
<div><img class="gallery-image" src="assets/images/gallery/pic8.png" alt="pic9"></div> <div><img class="gallery-image" src="http://localhost:3001/pic9.png" alt="pic9"></div>
<div><img class="gallery-image" src="assets/images/gallery/pic10.png" alt="pic10"></div> <div><img class="gallery-image" src="http://localhost:3001/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/pic1.png" alt="pic4"></div>
</div> </div>
<style> <style>