.
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
cd ~/
|
||||||
git clone https://git.limbosolutions.com/limbosolutions.com/git.limbosolutions.com
|
git clone https://git.limbosolutions.com/limbosolutions.com/git.limbosolutions.com
|
||||||
cd git.limbosolutions.com
|
cd git.limbosolutions.com
|
||||||
chmod +x /scripts
|
chmod +x /scripts
|
||||||
|
|||||||
@@ -1,51 +1,60 @@
|
|||||||
# Setup
|
# Setup
|
||||||
|
|
||||||
## Host LXC Container
|
## Create LXC Container
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
# set vars
|
# set vars
|
||||||
containername=gitsrv01
|
containername=gitsrv01
|
||||||
|
lxc_profile=enxd0374555c1f8_macvlan
|
||||||
```
|
```
|
||||||
|
|
||||||
### Create Container
|
## Setup Container
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
lxc launch ubuntu $containername -p enxd0374555c1f8_macvlan && \
|
lxc launch ubuntu $containername -p $lxc_profile
|
||||||
lxc config set $containername "security.nesting" "true" && \
|
# Setup container for docker
|
||||||
lxc exec $containername -- bash -c "apt update -y && apt upgrade -y && apt install --yes fuse-overlayfs" && \
|
lxc exec $containername -- bash -c "curl https://git.limbosolutions.com/kb/lxc/scripts/ubuntu-fuse-setup.sh | bash"
|
||||||
lxc exec $containername -- bash -c "cd ~/ && curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh" && \
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
For more information:
|
## Fresh Install
|
||||||
|
|
||||||
- [LXC/Docker](/kb/lxc/documentation/running-docker.md)
|
### Install Portainer
|
||||||
|
|
||||||
#### Portainer
|
|
||||||
|
|
||||||
##### Create
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
lxc exec $containername -- bash -c "docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest" && \
|
lxc exec $containername -- bash -c "curl https://git.limbosolutions.com/kb/portainer/scripts/setup.sh | bash"
|
||||||
lxc exec $containername -- bash -c "docker container list"
|
lxc exec $containername -- bash -c "docker container list"
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Remove
|
### Setup
|
||||||
|
|
||||||
```bash
|
1) Enter portainer (default port 9443)
|
||||||
lxc exec $containername -- bash -c "docker rm portainer --force"
|
2) Setup Credentials
|
||||||
```
|
3) Setup Custom Docker Images
|
||||||
|
- Duplicati with SqlClient
|
||||||
|
- Image Name : duplicati-sqlclient:latest
|
||||||
|
- [Docker File](https://git.limbosolutions.com/kb/duplicati/docker/sqlclient.dockerfile)
|
||||||
|
4) Create Stacks:
|
||||||
|
- [git.limbosolutions.com](../docker/docker-compose.yaml)
|
||||||
|
- requirements:
|
||||||
|
- Duplicati with sqlClient
|
||||||
|
|
||||||
For more information:
|
### Restore
|
||||||
|
|
||||||
- [Install Portainer](/kb/portainer/)
|
1) Execute Normal Setup
|
||||||
|
2)Check Every Container is ok and running
|
||||||
|
3)Stop Every Container (including portainer) except duplicati
|
||||||
|
4)Enter Duplicati
|
||||||
|
5)Import Backjob (if possible, if not possible next steps must be adapted)
|
||||||
|
- All Imported jobs schedules must be disabled (or disable write permissions on backup host)
|
||||||
|
6)Restore all files to original location
|
||||||
|
- If database engine is diferent do not restore db_data and check restore database before next steps
|
||||||
|
7)Start Container and check if everything is ok
|
||||||
|
|
||||||
### Remove
|
#### Database
|
||||||
|
|
||||||
```bash
|
Only required of database data files not recovarable (example: diferent databases engine)
|
||||||
lxc rm $containername --force
|
|
||||||
```
|
|
||||||
|
|
||||||
## Setup Gitea
|
1) Start Portainer container (stopped in restore process)
|
||||||
|
2) Start Database container (stopped in restore process)
|
||||||
Setup using [docker compose](docker/docker-compose.yaml).
|
3) Enter duplicati bash (by using portainer)
|
||||||
|
4) Execute Command
|
||||||
Reference in New Issue
Block a user