provider "docker" { host = "http://192.168.0.241:2375" } resource "docker_image" "nextcloud" { name = "nextcloud:19.0.1-apache" } resource "docker_image" "postgres" { name = "postgres:12.3" } resource "docker_image" "redis" { name = "redis:6.0.6-alpine" } resource "docker_image" "proxy" { name = "nginx:1.19.1-alpine" } resource "docker_volume" "nextcloud_web_data" { name = "nextcloud_web_data" } resource "docker_volume" "nextcloud_db_data" { name = "nextcloud_db_data" } resource "docker_network" "nextcloud" { name = "nextcloud" driver = "bridge" ipam_config { subnet = "172.200.0.0/16" gateway = "172.200.0.1" } } resource "docker_container" "nextcloud_proxy" { count = 1 name = "nextcloud_proxy_${count.index}" image = docker_image.proxy.latest ports { internal = 80 external = 80 } upload { file = "/etc/nginx/nginx.conf" #content = file("nextcloud.conf") content = <