Uploading docker files
This commit is contained in:
55
Docker compose files/vdirsyncer/README.txt
Normal file
55
Docker compose files/vdirsyncer/README.txt
Normal file
@@ -0,0 +1,55 @@
|
||||
Add to trusted
|
||||
|
||||
1. Open console on container
|
||||
2. php /var/www/html/occ config:system:set trusted_domains 1 --value=kalender.reijnst.se
|
||||
where value = the domain that is trusted
|
||||
|
||||
|
||||
|
||||
Step 1: Set trusted_domains with occ Command
|
||||
First, you need to make sure your trusted domain is set correctly in Nextcloud:
|
||||
|
||||
Run this command to set the trusted domain:
|
||||
|
||||
bash
|
||||
Copy
|
||||
Edit
|
||||
php /var/www/html/occ config:system:set trusted_domains 1 --value=kalender.reijnst.se
|
||||
Replace kalender.reijnst.se with your actual Nextcloud domain.
|
||||
|
||||
If you have multiple domains, you can set them incrementally (trusted_domains 2, trusted_domains 3, etc.).
|
||||
|
||||
Step 2: Set trusted_proxies with occ Command
|
||||
Next, you'll set the trusted proxy (the IP address of your reverse proxy — in this case, Caddy):
|
||||
|
||||
bash
|
||||
Copy
|
||||
Edit
|
||||
php /var/www/html/occ config:system:set trusted_proxies 1 --value=172.18.0.2
|
||||
Replace 127.0.0.1 with the IP address of your reverse proxy (if it's not on the same machine as Nextcloud). For example, if your Caddy is running remotely, use the Caddy server's IP.
|
||||
|
||||
Step 3: Set Forwarded Headers with occ Command
|
||||
You also need to tell Nextcloud to accept the forwarded headers. Run:
|
||||
|
||||
bash
|
||||
Copy
|
||||
Edit
|
||||
php /var/www/html/occ config:system:set forwarded_for_headers 1 --value=HTTP_X_FORWARDED_FOR
|
||||
php /var/www/html/occ config:system:set forwarded_for_headers 2 --value=HTTP_X_REAL_IP
|
||||
This will set the headers that Nextcloud will look for to get the real client IP (when behind a proxy).
|
||||
|
||||
Step 4: Verify and Restart
|
||||
After running the commands:
|
||||
|
||||
Check your Nextcloud setup by visiting the URL in a browser.
|
||||
|
||||
If everything is configured correctly, the "reverse proxy header configuration" error should be gone.
|
||||
|
||||
Restart your Nextcloud (or web server) to ensure the changes are applied.
|
||||
|
||||
|
||||
|
||||
|
||||
php /var/www/html/occ config:system:set overwrite.cli.url --value="https://kalender.reijnst.se"
|
||||
php /var/www/html/occ config:system:set overwriteprotocol --value="https"
|
||||
|
||||
27
Docker compose files/vdirsyncer/config
Normal file
27
Docker compose files/vdirsyncer/config
Normal file
@@ -0,0 +1,27 @@
|
||||
[general]
|
||||
status_path = "/app/data/status"
|
||||
|
||||
[pair google_nextcloud]
|
||||
a = "google"
|
||||
b = "nextcloud"
|
||||
collections = ["from a", "from b"]
|
||||
# Optional:
|
||||
# conflict_resolution = "a wins" # or "b wins"
|
||||
# metadata = ["color", "displayname"] # sync extra properties
|
||||
|
||||
[storage google]
|
||||
type = "google"
|
||||
client_id = "882156610771-aioeubp72oecurc1lbk9rcij1un8ui40.apps.googleusercontent.com"
|
||||
client_secret = "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"
|
||||
token_file = "/app/config/google_token.json"
|
||||
|
||||
[storage nextcloud]
|
||||
type = "caldav"
|
||||
url = "https://kalender.reijnst.se/remote.php/dav/calendars/Johnny%20Reijnst/ikea-1/"
|
||||
username = "Johnny.Reijnst@gmail.com"
|
||||
password = "Sommartiden2025!"
|
||||
# Optional advanced options:
|
||||
# verify = true
|
||||
# auth = "guess"
|
||||
# item_types = ["VEVENT", "VTODO"]
|
||||
# start_date = "datetime.now() - timedelta(days=365)"
|
||||
15
Docker compose files/vdirsyncer/docker-compose.yml
Normal file
15
Docker compose files/vdirsyncer/docker-compose.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
gcaldav:
|
||||
image: ghcr.io/tomsquest/gcal-dav:latest
|
||||
container_name: gcal-dav
|
||||
ports:
|
||||
- "5232:5232"
|
||||
volumes:
|
||||
- /volume1/Docker/gcaldav/config:/app/config
|
||||
- /volume1/Docker/gcaldav/data:/app/data
|
||||
environment:
|
||||
- GCD_CLIENT_ID=y882156610771-aioeubp72oecurc1lbk9rcij1un8ui40.apps.googleusercontent.com
|
||||
- GCD_CLIENT_SECRET=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
|
||||
restart: unless-stopped
|
||||
68
Docker compose files/vdirsyncer/powershell.ps1
Normal file
68
Docker compose files/vdirsyncer/powershell.ps1
Normal file
@@ -0,0 +1,68 @@
|
||||
# Define your Docker Compose directory
|
||||
$composeDir = "C:\Users\johnn\Desktop\Docker\Nextcloud"
|
||||
|
||||
# Create the directory if it does not exist
|
||||
if (-not (Test-Path $composeDir)) {
|
||||
New-Item -ItemType Directory -Path $composeDir
|
||||
}
|
||||
|
||||
# Change to the target directory
|
||||
Set-Location -Path $composeDir
|
||||
|
||||
# Create a docker-compose.yml file for Nextcloud
|
||||
$dockerComposeContent = @"
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
nextcloud:
|
||||
image: nextcloud:latest
|
||||
container_name: nextcloud
|
||||
ports:
|
||||
- "8080:80"
|
||||
environment:
|
||||
MYSQL_PASSWORD: secret
|
||||
MYSQL_DATABASE: nextcloud
|
||||
MYSQL_USER: nextcloud
|
||||
MYSQL_HOST: db
|
||||
volumes:
|
||||
- nextcloud_data:/var/www/html
|
||||
depends_on:
|
||||
- db
|
||||
restart: unless-stopped
|
||||
|
||||
db:
|
||||
image: mysql:5.7
|
||||
container_name: nextcloud_db
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: secret
|
||||
MYSQL_DATABASE: nextcloud
|
||||
MYSQL_USER: nextcloud
|
||||
MYSQL_PASSWORD: secret
|
||||
volumes:
|
||||
- nextcloud_db_data:/var/lib/mysql
|
||||
restart: unless-stopped
|
||||
|
||||
redis:
|
||||
image: redis:latest
|
||||
container_name: redis
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
nextcloud_data:
|
||||
nextcloud_db_data:
|
||||
"@
|
||||
|
||||
# Write docker-compose.yml to the directory
|
||||
$dockerComposeContent | Out-File -FilePath "$composeDir\docker-compose.yml" -Force
|
||||
|
||||
# Pull the Docker images and start the containers
|
||||
Write-Host "Running docker-compose up..."
|
||||
docker-compose -f "$composeDir\docker-compose.yml" up -d
|
||||
|
||||
# Wait for Nextcloud to fully initialize
|
||||
Write-Host "Waiting for Nextcloud to initialize..."
|
||||
Start-Sleep -Seconds 30
|
||||
|
||||
# Accessing Nextcloud to install Appointments app manually
|
||||
Write-Host "Nextcloud setup completed. Access it at http://localhost:8080"
|
||||
Write-Host "Please log in and install the Appointments app from the Nextcloud app store."
|
||||
Reference in New Issue
Block a user