This commit is contained in:
38
.gitea/workflows/deploy.yml
Normal file
38
.gitea/workflows/deploy.yml
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
name: Build and Deploy koneko.rocks
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-deploy:
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Verify Docker access
|
||||||
|
run: |
|
||||||
|
echo "Checking Docker access from container..."
|
||||||
|
docker version
|
||||||
|
docker compose version
|
||||||
|
|
||||||
|
# use this as template if you need to build
|
||||||
|
#- name: Build project
|
||||||
|
# run: |
|
||||||
|
# echo "Running build..."
|
||||||
|
# ./build.sh
|
||||||
|
|
||||||
|
- name: Store artifact
|
||||||
|
run: |
|
||||||
|
echo "Storing artifact..."
|
||||||
|
mkdir -p /opt/artifacts/koneko-static-site
|
||||||
|
cp -r . /opt/artifacts/koneko-static-site/
|
||||||
|
|
||||||
|
- name: Deploy with Docker Compose
|
||||||
|
run: |
|
||||||
|
echo "Deploying with docker-compose..."
|
||||||
|
cd /opt/artifacts/koneko-static-site
|
||||||
|
docker compose down
|
||||||
|
docker compose up -d --build
|
||||||
|
|
2
Dockerfile
Normal file
2
Dockerfile
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
FROM nginx:alpine
|
||||||
|
COPY index.html /usr/share/nginx/html/index.html
|
21
docker-compose.yml
Normal file
21
docker-compose.yml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
services:
|
||||||
|
web:
|
||||||
|
container_name: koneko-landing
|
||||||
|
restart: unless-stopped
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.koneko.rule=Host(`koneko.rocks`)"
|
||||||
|
- "traefik.http.routers.koneko.entrypoints=websecure"
|
||||||
|
- "traefik.http.routers.koneko.tls=true"
|
||||||
|
- "traefik.http.routers.koneko.tls.certresolver=letsencrypt"
|
||||||
|
- "traefik.http.services.koneko.loadbalancer.server.port=80"
|
||||||
|
networks:
|
||||||
|
- frontend
|
||||||
|
|
||||||
|
networks:
|
||||||
|
frontend:
|
||||||
|
external: true # Use the external Traefik network (if Traefik is running on this network)
|
||||||
|
|
12
index.html
Normal file
12
index.html
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>koneko.rocks</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<a href="https://blog.overflow.fun/">blog site</a>
|
||||||
|
<h1>Landing page because I have nothing better to put here. I might scrap this domain in general.</h1>
|
||||||
|
</body>
|
||||||
|
</html>
|
Reference in New Issue
Block a user