This commit is contained in:
2022-10-09 18:12:20 +01:00
parent 5edf0b7cb2
commit 17b4417a0a
3 changed files with 41 additions and 16 deletions

View File

@@ -1,13 +1,13 @@
version: "3"
services:
duplicati:
image: duplicati-sqlclient # requirement https://git.limbosolutions.com/kb/duplicati/src/branch/main/docker/sqlclient.dockerfile
image: duplicati-mysqlclient
environment:
- DB_HOST=db
- DB_NAME=${DB_NAME}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
- DB_TARGETFOLDER=/git/db-dumps
- MYSQL_HOST=db
- MYSQL_DATABASE=${DB_NAME}
- MYSQL_USER=${DB_USER}
- MYSQL_PASSWORD=${DB_PASSWORD}
- DESTINATION=/git/db-dumps
volumes:
- duplicati-data:/data
- duplicati-data:/git/duplicati-data:ro
@@ -15,16 +15,16 @@ services:
- db:/git/db:ro
- db-dumps:/git/db-dumps
ports:
- 8200:8200
- ${DUPLICATI_PORT}:8200
restart: unless-stopped
volumes:
duplicati-data:
data:
name: ${GITEA_APP_VOLUMES_DATA_NAME}
name: ${GITEA_APP_DATA_VOLUME_NAME}
db:
name: ${GITEA_DB_VOLUMES_DATA_NAME}
name: ${GITEA_DB_DATA_VOLUME_NAME}
db-dumps:
name: ${GITEA_DB_VOLUMES_DB-DUMPS_NAME}
name: ${GITEA_DB_DUMPS_VOLUME_NAME}
networks:
gitea:
name: ${DEFAULT_NETWORK_NAME}

View File

@@ -15,7 +15,7 @@ services:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- ${APP_PORT}:80
- ${GITEA_PORT}:80
networks:
- gitea
db:
@@ -35,11 +35,11 @@ services:
- gitea
volumes:
data:
name: ${GITEA_APP_DATA-VOLUME_NAME}
name: ${GITEA_APP_DATA_VOLUME_NAME}
db:
name: ${GITEA_DB_DATA_VOLUME_NAME}
db-dumps:
name: ${GITEA_DB-DUMPS_VOLUME_NAME}
name: ${GITEA_DB_DUMPS_VOLUME_NAME}
networks:
gitea:
name: ${DEFAULT_NETWORK_NAME}

View File

@@ -35,12 +35,14 @@ lxc exec $LXC_CONTAINER_NAME -- bash -c "curl -s \"https://git.limbosolutions.co
## Check docker for fusefs
lxc exec $LXC_CONTAINER_NAME -- bash -c "docker info"
#install Portainer
#Setup Portainer
lxc exec $LXC_CONTAINER_NAME -- bash -c "curl -s \"https://git.limbosolutions.com/kb/portainer/raw/branch/main/scripts/setup.sh\" | bash"
#confirm container ip address
lxc exec $LXC_CONTAINER_NAME -- bash -c "ip a"
lxc restart $LXC_CONTAINER_NAME
```
### Check instalation
@@ -48,10 +50,10 @@ lxc exec $LXC_CONTAINER_NAME -- bash -c "ip a"
From other computer
```bash
ping http://$LXC_CONTAINER_NAME:9000
ping $LXC_CONTAINER_NAME
```
Access portainer (http://$LXC_CONTAINER_NAME:9000_) for inicial setup:
Access portainer (https://$LXC_CONTAINER_NAME:9443/) for inicial setup:
- Setup administration username and password
@@ -60,3 +62,26 @@ Access portainer (http://$LXC_CONTAINER_NAME:9000_) for inicial setup:
```bash
lxc rm $LXC_CONTAINER_NAME --force
```
## set a static ip
On lxc container
``` bash
Example:
/etc/netplan/01-netcfg.yaml
network:
version: 2
renderer: networkd
ethernets:
eth0:
dhcp4: no
addresses:
- 192.168.121.221/24
gateway4: 192.168.121.1
nameservers:
addresses: [8.8.8.8, 1.1.1.1]
``` bash