move repositories under docker directory
This commit is contained in:
@@ -1 +1,2 @@
|
||||
.env
|
||||
docker/
|
||||
|
||||
@@ -36,8 +36,9 @@ docker compose logs -f gitea
|
||||
# Stop containers but keep repositories and database data
|
||||
docker compose down
|
||||
|
||||
# Stop and permanently delete all Git data
|
||||
docker compose down -v
|
||||
# Stop containers and permanently delete all Git data
|
||||
docker compose down
|
||||
Remove-Item -Recurse -Force .\docker
|
||||
```
|
||||
|
||||
## Production notes
|
||||
@@ -45,5 +46,5 @@ docker compose down -v
|
||||
- Put Gitea behind HTTPS with a reverse proxy before exposing it to the internet.
|
||||
- Use a managed or separately backed-up PostgreSQL instance for important repositories.
|
||||
- Set `DISABLE_REGISTRATION=true` and `REQUIRE_SIGNIN_VIEW=true` for a private team server.
|
||||
- Back up both the `gitea_data` and `postgres_data` volumes.
|
||||
- All persistent data, including repositories, Gitea configuration, attachments, and PostgreSQL data, is stored in `docker/`. Stop the stack with `docker compose down`, then back up or move that directory together with `.env` and `docker-compose.yml`.
|
||||
- Update `GITEA_ROOT_URL` and `GITEA_DOMAIN` to the public hostname before deploying.
|
||||
|
||||
+2
-6
@@ -8,7 +8,7 @@ services:
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-change-me-in-env}
|
||||
POSTGRES_DB: ${POSTGRES_DB:-gitea}
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
- ./docker/postgres:/var/lib/postgresql/data
|
||||
networks:
|
||||
- git-server
|
||||
healthcheck:
|
||||
@@ -42,16 +42,12 @@ services:
|
||||
- "${GITEA_HTTP_PORT:-3000}:3000"
|
||||
- "${GITEA_SSH_PORT:-2222}:2222"
|
||||
volumes:
|
||||
- gitea_data:/var/lib/gitea
|
||||
- ./docker/gitea:/var/lib/gitea
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
networks:
|
||||
- git-server
|
||||
|
||||
volumes:
|
||||
gitea_data:
|
||||
postgres_data:
|
||||
|
||||
networks:
|
||||
git-server:
|
||||
driver: bridge
|
||||
|
||||
Reference in New Issue
Block a user