Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thoughts about Gitea Pages #19129

Closed
bvn13 opened this issue Mar 18, 2022 · 1 comment
Closed

Thoughts about Gitea Pages #19129

bvn13 opened this issue Mar 18, 2022 · 1 comment

Comments

@bvn13
Copy link

bvn13 commented Mar 18, 2022

Feature Description

I've seen #302

Let me describe my workaround of it.

My gitea in docker:

$ cat docker-compose.yaml 
version: "3.7"

networks:
  gitea:
    external: true

services:
  gitea:
    image: gitea/gitea:1.16.4
    container_name: gitea
    environment:
      - USER_UID=1000
      - USER_GID=1000
      - GITEA__database__DB_TYPE=postgres
      - GITEA__database__HOST=db:5432
      - GITEA__database__NAME=gitea
      - GITEA__database__USER=gitea
      - GITEA__database__PASSWD=gitea
    restart: always
    networks:
      - gitea
    volumes:
      - ./gitea:/data
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    ports:
      - "8080:3000"
      - "2221:22"
    expose:
      - 3000
    depends_on:
      - db
  db:
     image: postgres:13
     restart: always
     environment:
       - POSTGRES_USER=gitea
       - POSTGRES_PASSWORD=gitea
       - POSTGRES_DB=gitea
     networks:
       - gitea
     volumes:
       - ./postgres:/var/lib/postgresql/data

$ cat rebuild.sh 
#!/bin/bash
docker-compose down
docker-compose up -d --no-deps --build
docker-compose logs gitea

My "pages" docker:

$ cat docker-compose.yaml 
version: '3.7'

networks:
  bvn13me:
    external: true

services:

  nginx:
    build:
      context: .
    image: "bvn13me"
    container_name: bvn13me
    networks:
      - bvn13me
    ports:
      - "8081:8080"

$ cat Dockerfile 
FROM python:3.9

# Install python3
RUN apt-get update
RUN apt-get install -y python3
RUN apt-get install -y git

# Invalidate cache
ARG CACHEBUST=1

# Copy html
RUN git clone http://gitea.bvn13.me/bvn13/bvn13-me.git /app
RUN ls -la /
RUN ls -la /app
RUN ls -la /app/src
WORKDIR /app/src

# Run http server on port 8080
EXPOSE  8080
CMD ["python3", "-m", "http.server", "8080"]

$ cat rebuild.sh 
#!/bin/bash
docker-compose down
docker-compose build --no-cache --build-arg CACHEBUST=$(date +%s) # cache cleaning does not work yet
docker-compose up -d --no-deps --no-build

I should mention my gitea and my "pages" are mapped to gitea.bvn13.me with nginx.
My workaround is to run last rebuild.sh in order to update my "pages".

So... will it be helpful for solving that issue?

Screenshots

No response

@techknowlogick
Copy link
Member

@bvn13 you may be interested in https://codeberg.org/Codeberg/pages-server/ which doesn't require any of the manual steps you have described.

@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants