diff --git a/Dockerfile b/Dockerfile index c2f3f0a..7f91250 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/Justfile b/Justfile index 1003902..73dc039 100644 --- a/Justfile +++ b/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." diff --git a/docker-compose.build.yml b/docker-compose.build.yml index d6cb328..e03e71f 100644 --- a/docker-compose.build.yml +++ b/docker-compose.build.yml @@ -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 diff --git a/docker-compose.yml b/docker-compose.yml index 6936d5d..015c6fc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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: diff --git a/docker-data/caddy-data/caddy/last_clean.json b/docker-data/caddy-data/caddy/last_clean.json new file mode 100644 index 0000000..2b7225e --- /dev/null +++ b/docker-data/caddy-data/caddy/last_clean.json @@ -0,0 +1 @@ +{"tls":{"timestamp":"2024-04-12T06:59:35.470719011Z","instance_id":"26cce6f0-a3cb-45a7-b088-15bb6a9cbada"}} \ No newline at end of file diff --git a/static/assets/images/gallery/pic1.png b/docker-data/pictures/pic1.png similarity index 100% rename from static/assets/images/gallery/pic1.png rename to docker-data/pictures/pic1.png diff --git a/static/assets/images/gallery/pic10.png b/docker-data/pictures/pic10.png similarity index 100% rename from static/assets/images/gallery/pic10.png rename to docker-data/pictures/pic10.png diff --git a/static/assets/images/gallery/pic2.png b/docker-data/pictures/pic2.png similarity index 100% rename from static/assets/images/gallery/pic2.png rename to docker-data/pictures/pic2.png diff --git a/static/assets/images/gallery/pic3.png b/docker-data/pictures/pic3.png similarity index 100% rename from static/assets/images/gallery/pic3.png rename to docker-data/pictures/pic3.png diff --git a/static/assets/images/gallery/pic4.png b/docker-data/pictures/pic4.png similarity index 100% rename from static/assets/images/gallery/pic4.png rename to docker-data/pictures/pic4.png diff --git a/static/assets/images/gallery/pic5.png b/docker-data/pictures/pic5.png similarity index 100% rename from static/assets/images/gallery/pic5.png rename to docker-data/pictures/pic5.png diff --git a/static/assets/images/gallery/pic6.png b/docker-data/pictures/pic6.png similarity index 100% rename from static/assets/images/gallery/pic6.png rename to docker-data/pictures/pic6.png diff --git a/static/assets/images/gallery/pic7.png b/docker-data/pictures/pic7.png similarity index 100% rename from static/assets/images/gallery/pic7.png rename to docker-data/pictures/pic7.png diff --git a/static/assets/images/gallery/pic8.png b/docker-data/pictures/pic8.png similarity index 100% rename from static/assets/images/gallery/pic8.png rename to docker-data/pictures/pic8.png diff --git a/static/assets/images/gallery/pic9.png b/docker-data/pictures/pic9.png similarity index 100% rename from static/assets/images/gallery/pic9.png rename to docker-data/pictures/pic9.png diff --git a/init.sql b/init.sql deleted file mode 100644 index 72c4ecb..0000000 --- a/init.sql +++ /dev/null @@ -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 -); diff --git a/src/routes/gallery/+page.svelte b/src/routes/gallery/+page.svelte index 402d1f5..acb1b2f 100644 --- a/src/routes/gallery/+page.svelte +++ b/src/routes/gallery/+page.svelte @@ -9,21 +9,21 @@
-
pic1
-
pic2
-
pic3
+
pic1
+
pic2
+
pic3
-
pic6
-
pic7
-
pic3
-
pic5
+
pic6
+
pic7
+
pic3
+
pic5
-
pic8
-
pic9
-
pic10
-
pic4
+
pic8
+
pic9
+
pic10
+
pic4