You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
879 B
Markdown
56 lines
879 B
Markdown
# Setup gitea with Postgres DB server on Docker
|
|
|
|
1. Start docker
|
|
|
|
```
|
|
$ docker-composer up -d
|
|
```
|
|
|
|
4. Stop server
|
|
```
|
|
$ docker-compose down
|
|
```
|
|
|
|
## Setup mySQL Database. Enter 'Y' for all question
|
|
- Goto mariadb shell
|
|
|
|
```shell
|
|
$ docker exec -it gitea-db-1 bash
|
|
```
|
|
|
|
- Inside the container enter the following to setup the initial database
|
|
```
|
|
$ mysql_secure_installation
|
|
```
|
|
|
|
```
|
|
$ mysql -u root
|
|
```
|
|
|
|
|
|
- Allow from localhost ONLY
|
|
```
|
|
CREATE DATABASE gitea;
|
|
|
|
GRANT ALL PRIVILEGES ON gitea.* TO 'gitea'@'localhost' IDENTIFIED BY 'ENTERPASSWORD';
|
|
|
|
FLUSH PRIVILEGES;
|
|
|
|
exit
|
|
```
|
|
|
|
- Allow from subnet ONLY (172.24.*.*)
|
|
```
|
|
CREATE DATABASE gitea;
|
|
|
|
GRANT ALL PRIVILEGES ON gitea.* TO 'gitea'@'172.24.%' IDENTIFIED BY 'ENTERPASSWORD';
|
|
|
|
FLUSH PRIVILEGES;
|
|
|
|
exit
|
|
```
|
|
|
|
- Then, continue with gitea setup
|
|
- [Gitea Installation](http://localhost:3000)
|
|
- 
|