Uploading docker files

This commit is contained in:
2025-08-09 09:24:29 +02:00
commit b8ef06265c
19 changed files with 796 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
version: '3.8'
services:
booked:
image: booked-scheduler/booked:latest
container_name: booked_scheduler
ports:
- "8080:80"
environment:
- DB_HOST=db
- DB_PORT=5432
- DB_NAME=booked_db
- DB_USER=booked_user
- DB_PASSWORD=secret
depends_on:
- db
restart: unless-stopped
db:
image: postgres:13
container_name: booked_db
environment:
POSTGRES_USER: booked_user
POSTGRES_PASSWORD: secret
POSTGRES_DB: booked_db
volumes:
- booked_db_data:/var/lib/postgresql/data
restart: unless-stopped
volumes:
booked_db_data:

View File

@@ -0,0 +1,58 @@
# Define your Docker Compose directory
$composeDir = "C:\Users\johnn\Desktop\Docker\Booked Scheduler"
# 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 Booked Scheduler
$dockerComposeContent = @"
version: '3.8'
services:
booked:
image: booked-scheduler/booked:latest
container_name: booked_scheduler
ports:
- "8080:80"
environment:
- DB_HOST=db
- DB_PORT=5432
- DB_NAME=booked_db
- DB_USER=booked_user
- DB_PASSWORD=secret
depends_on:
- db
restart: unless-stopped
db:
image: postgres:13
container_name: booked_db
environment:
POSTGRES_USER: booked_user
POSTGRES_PASSWORD: secret
POSTGRES_DB: booked_db
volumes:
- booked_db_data:/var/lib/postgresql/data
restart: unless-stopped
volumes:
booked_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
# Check if everything is running
Write-Host "Checking the status of the containers..."
docker ps
Write-Host "Booked Scheduler setup completed. You can access it at http://localhost:8080"

View File

@@ -0,0 +1,40 @@
# Redirect HTTP to HTTPS for Kalender
http://kalender.reijnst.se {
redir https://kalender.reijnst.se{uri} permanent
}
# HTTPS configuration for Nextcloud
kalender.reijnst.se {
reverse_proxy 192.168.50.55:8080
# Automatically enable HTTPS with Let's Encrypt
tls Johnny.Reijnst@gmail.com
# Forward necessary headers for the reverse proxy
header {
X-Real-IP {remote}
X-Forwarded-For {remote}
X-Forwarded-Proto {scheme}
}
}
# Server configuration for server.reijnst.se (if required)
server.reijnst.se {
reverse_proxy 192.168.50.55:8000
# Automatically enable HTTPS with Let's Encrypt
tls Johnny.Reijnst@gmail.com
}
# Redirect HTTP to HTTPS for lekstugan
http://lekstugan.reijnst.se {
redir https://lekstugan.reijnst.se{uri} permanent
}
# HTTPS configuration for lekstugan
http://lekstugan.reijnst.se {
reverse_proxy 192.168.50.55:9120
# Automatically enable HTTPS with Let's Encrypt
tls Johnny.Reijnst@gmail.com
}

View File

@@ -0,0 +1,14 @@
version: '3.7'
services:
caddy:
image: caddy:latest
container_name: caddy-reverse-proxy
ports:
- "9000:80"
- "9001:443"
volumes:
- /volume1/Docker/caddy/conf:/etc/caddy
- /volume1/Docker/caddy/data:/data
- /volume1/Docker/caddy/config:/config
restart: unless-stopped

View File

@@ -0,0 +1,45 @@
version: '3.8'
services:
wordpress:
image: wordpress:latest
container_name: luxdining_wordpress
ports:
- "9120:80"
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: luxuser
WORDPRESS_DB_PASSWORD: luxpass
WORDPRESS_DB_NAME: luxdb
volumes:
- lux_wp_data:/var/www/html
restart: always
depends_on:
- db
db:
image: mariadb:10.11
container_name: luxdining_db
restart: always
environment:
MYSQL_DATABASE: luxdb
MYSQL_USER: luxuser
MYSQL_PASSWORD: luxpass
MYSQL_ROOT_PASSWORD: rootpass
volumes:
- lux_db_data:/var/lib/mysql
phpmyadmin:
image: phpmyadmin:latest
container_name: luxdining_phpmyadmin
restart: always
ports:
- "9121:80"
environment:
PMA_HOST: db
PMA_USER: luxuser
PMA_PASSWORD: luxpass
volumes:
lux_wp_data:
lux_db_data:

View 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"

View File

@@ -0,0 +1,40 @@
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
TRUSTED_DOMAINS: reijnst.asuscomm.com, reijnst.asuscomm.com:9900
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:

View 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."

View File

@@ -0,0 +1,29 @@
version: '3.9'
services:
calcom:
image: calcom/cal.com:latest
ports:
- "3000:3000"
environment:
DATABASE_URL: postgresql://caluser:calpass@db:5432/caldb
DATABASE_DIRECT_URL: postgresql://caluser:calpass@db:5432/caldb # Fix: Added DATABASE_DIRECT_URL
NEXTAUTH_SECRET: oR,f^0+%1X)|Th@sDp{6G:UY>FCxVJ`#
NEXT_PUBLIC_APP_URL: http://localhost:3000
CALENDSO_ENCRYPTION_KEY: ob_DO!AX(l)BkGu?Si`FZ{yhV^j/z<vJ
NODE_ENV: production
depends_on:
- db
db:
image: postgres:15
restart: always
environment:
POSTGRES_DB: caldb
POSTGRES_USER: caluser
POSTGRES_PASSWORD: calpass
volumes:
- caldata:/var/lib/postgresql/data
volumes:
caldata:

View File

@@ -0,0 +1,76 @@
# PowerShell script to install and run Cal.com with Docker
# Save as: start-calcom.ps1
$folder = "C:\Users\johnn\Desktop\Docker\calcom-app"
$composeFile = "$folder\docker-compose.yml"
# Create project directory if it doesn't exist
if (-Not (Test-Path $folder)) {
New-Item -ItemType Directory -Path $folder | Out-Null
}
# Generate secure random strings for secrets
function Generate-Secret($length) {
return -join ((33..126) | Get-Random -Count $length | ForEach-Object {[char]$_})
}
$NEXTAUTH_SECRET = Generate-Secret 32
$ENCRYPTION_KEY = Generate-Secret 32
# Write Docker Compose file with both DATABASE_URL and DATABASE_DIRECT_URL
@"
version: '3.9'
services:
calcom:
image: calcom/cal.com:latest
ports:
- "3000:3000"
environment:
DATABASE_URL: postgresql://caluser:calpass@db:5432/caldb
DATABASE_DIRECT_URL: postgresql://caluser:calpass@db:5432/caldb # Fix: Added DATABASE_DIRECT_URL
NEXTAUTH_SECRET: $NEXTAUTH_SECRET
NEXT_PUBLIC_APP_URL: http://localhost:3000
CALENDSO_ENCRYPTION_KEY: $ENCRYPTION_KEY
NODE_ENV: production
depends_on:
- db
db:
image: postgres:15
restart: always
environment:
POSTGRES_DB: caldb
POSTGRES_USER: caluser
POSTGRES_PASSWORD: calpass
volumes:
- caldata:/var/lib/postgresql/data
volumes:
caldata:
"@ | Set-Content -Path $composeFile
# Navigate to the folder
Set-Location $folder
# Start Docker containers
Write-Host "🚀 Starting Docker containers..."
docker compose up -d
# Wait for DB and Cal.com to initialize (30 seconds)
Write-Host "⏳ Waiting for services to initialize..."
Start-Sleep -Seconds 30
# Apply Prisma database migrations
Write-Host "📦 Running Prisma migrations..."
docker compose exec calcom yarn prisma migrate deploy
# Seed the database
Write-Host "🌱 Seeding the database..."
docker compose exec calcom yarn prisma db seed
# Open Cal.com in the browser
Write-Host "🌐 Opening Cal.com at http://localhost:3000"
Start-Process "http://localhost:3000"
Write-Host "`n✅ Cal.com is ready!"

View 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"

View File

@@ -0,0 +1,16 @@
google:
client_id: "882156610771-aioeubp72oecurc1lbk9rcij1un8ui40.apps.googleusercontent.com"
client_secret: "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"
calendar_id: "11f8dcdaf04dd0d98f99220e12cbcbc6fc8d28ec13403f4090332b416a5ec24a@group.calendar.google.com"
caldav:
url: "https://kalender.reijnst.se/remote.php/dav/calendars/Johnny%20Reijnst/ikea-1/"
username: "Johnny.Reijnst@gmail.com"
password: "Sommartiden2025!"
sync:
direction: both # or g2c or c2g
interval: 60 # in seconds (5 minutes)
logging:
level: INFO

View File

@@ -0,0 +1,11 @@
version: "3"
services:
caldav-gsync:
image: chrisgass/caldav-gsync:latest
container_name: caldav-gsync
volumes:
- /volume1/Docker/caldav-gsync/config:/config
environment:
- TZ=UTC
restart: unless-stopped

View File

@@ -0,0 +1,31 @@
version: '3.8'
services:
web:
image: alexdoe/easyappointments:latest
container_name: easyappointments_web
ports:
- "8080:80"
environment:
- DB_HOST=db
- DB_PORT=5432
- DB_NAME=easyappointments
- DB_USER=easyappointments_user
- DB_PASSWORD=easyappointments_pass
depends_on:
- db
restart: unless-stopped
db:
image: postgres:13
container_name: easyappointments_db
environment:
POSTGRES_DB: easyappointments
POSTGRES_USER: easyappointments_user
POSTGRES_PASSWORD: easyappointments_pass
volumes:
- easyappointments_db_data:/var/lib/postgresql/data
restart: unless-stopped
volumes:
easyappointments_db_data:

View File

@@ -0,0 +1,62 @@
# PowerShell Script to Install Easy!Appointments with Docker
# Define folder where docker-compose.yml will be located
$folder = "C:\Users\johnn\Desktop\Docker\easyappointments"
$composeFile = "$folder\docker-compose.yml"
# Create project directory if it doesn't exist
if (-Not (Test-Path $folder)) {
New-Item -ItemType Directory -Path $folder | Out-Null
}
# Create Docker Compose file with Easy!Appointments and PostgreSQL configuration
@"
version: '3.8'
services:
web:
image: alexdoe/easyappointments:latest
container_name: easyappointments_web
ports:
- "8080:80"
environment:
- DB_HOST=db
- DB_PORT=5432
- DB_NAME=easyappointments
- DB_USER=easyappointments_user
- DB_PASSWORD=easyappointments_pass
depends_on:
- db
restart: unless-stopped
db:
image: postgres:13
container_name: easyappointments_db
environment:
POSTGRES_DB: easyappointments
POSTGRES_USER: easyappointments_user
POSTGRES_PASSWORD: easyappointments_pass
volumes:
- easyappointments_db_data:/var/lib/postgresql/data
restart: unless-stopped
volumes:
easyappointments_db_data:
"@ | Set-Content -Path $composeFile
# Navigate to the folder with the docker-compose.yml
Set-Location $folder
# Start Docker containers
Write-Host "🚀 Starting Docker containers..."
docker-compose up -d
# Wait for DB and Easy!Appointments to initialize (30 seconds)
Write-Host "⏳ Waiting for services to initialize..."
Start-Sleep -Seconds 30
# Open Easy!Appointments in the browser
Write-Host "🌐 Opening Easy!Appointments at http://localhost:8080"
Start-Process "http://localhost:8080"
Write-Host "`n✅ Easy!Appointments is now running!"

View 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"

View 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)"

View 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

View 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."