move repositories under docker directory
This commit is contained in:
@@ -1 +1,2 @@
|
|||||||
.env
|
.env
|
||||||
|
docker/
|
||||||
|
|||||||
@@ -36,8 +36,9 @@ docker compose logs -f gitea
|
|||||||
# Stop containers but keep repositories and database data
|
# Stop containers but keep repositories and database data
|
||||||
docker compose down
|
docker compose down
|
||||||
|
|
||||||
# Stop and permanently delete all Git data
|
# Stop containers and permanently delete all Git data
|
||||||
docker compose down -v
|
docker compose down
|
||||||
|
Remove-Item -Recurse -Force .\docker
|
||||||
```
|
```
|
||||||
|
|
||||||
## Production notes
|
## Production notes
|
||||||
@@ -45,5 +46,5 @@ docker compose down -v
|
|||||||
- Put Gitea behind HTTPS with a reverse proxy before exposing it to the internet.
|
- 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.
|
- 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.
|
- 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.
|
- 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_PASSWORD: ${POSTGRES_PASSWORD:-change-me-in-env}
|
||||||
POSTGRES_DB: ${POSTGRES_DB:-gitea}
|
POSTGRES_DB: ${POSTGRES_DB:-gitea}
|
||||||
volumes:
|
volumes:
|
||||||
- postgres_data:/var/lib/postgresql/data
|
- ./docker/postgres:/var/lib/postgresql/data
|
||||||
networks:
|
networks:
|
||||||
- git-server
|
- git-server
|
||||||
healthcheck:
|
healthcheck:
|
||||||
@@ -42,16 +42,12 @@ services:
|
|||||||
- "${GITEA_HTTP_PORT:-3000}:3000"
|
- "${GITEA_HTTP_PORT:-3000}:3000"
|
||||||
- "${GITEA_SSH_PORT:-2222}:2222"
|
- "${GITEA_SSH_PORT:-2222}:2222"
|
||||||
volumes:
|
volumes:
|
||||||
- gitea_data:/var/lib/gitea
|
- ./docker/gitea:/var/lib/gitea
|
||||||
- /etc/timezone:/etc/timezone:ro
|
- /etc/timezone:/etc/timezone:ro
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
networks:
|
networks:
|
||||||
- git-server
|
- git-server
|
||||||
|
|
||||||
volumes:
|
|
||||||
gitea_data:
|
|
||||||
postgres_data:
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
git-server:
|
git-server:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
|||||||
Reference in New Issue
Block a user