这是vps服务器的错误:
Web程序的网页未显示,或者不完整。它托管在vps服务器上,它运行在一个docker容器中,分别显示端口8070和8071。
如何让它们正确可视化?
数据库存在问题吗?
是内存问题还是服务器性能?
::::这是我的代码terraform ::::
terraform {
required_version = ">=0.10.6"
}
provider "rancher" {
api_url = "http://144.xxx.xx.xx:8080"
access_key = "FxxxxxxxxxxxxxAF9"
secret_key = "MVxxxxxxxxxxxxxxxxxxxxxxxxxxxxxeHtG"
}
resource "rancher_environment" "production" {
name = "production"
description = "Production Environment"
orchestration = "cattle"
}
resource "rancher_environment" "staging" {
name = "stagin"
description = "Stagin Environment"
orchestration = "kubernetes"
}
resource "docker_container" "nginx-server" {
name = "nginx-server"
image = "nginx:latest"
ports {
internal = 80
}
volumes {
container_path = "./nginx.conf"
read_only = true
}
}
provider "postgresql" {
host = "1xx.xxx.xx.xx"
port = 5432
database = "postgres"
username = "odoo"
password = "odoo"
}
resource "docker_container" "db-storage" {
name = "db-storage"
image = "busybox"
volumes= {
container_path = "/var/lib/postgresql/data/pgdata"
}
labels =
{io.rancher.container.start_once = "true"}
}
resource "docker_container" "db" {
image = "postgres"
name = "db"
restart = "always"
hostname = "14x.xxx.xx.xx"
env = [
"production",
"PGDATA= /var/lib/postgresql/data/pgdata",
"POSTGRES_DB= odoo_db",
"POSTGRES_PASSWORD=odoo",
"POSTGRES_USER=odoo"]
volumes = {
from_container = "db-storage"
}
ports = {
internal = 5432
external = 5432
}
labels=
{ io.rancher.sidekicks = "db-storage"}
}
resource "docker_container" "Odoo-iku" {
name = "Odoo-iku"
image = "ikusolutions/odoo-iku:latest"
links = ["db"]
ports {
external = 8070
internal = 8069
}
hostname = "iku"
domainname = "iku.solutions"
restart = "always"
env = ["production",
"DB_PORT_5432_TCP_ADDR=db",
"DB_PORT_5432_TCP_PORT=5432",
"DB_ENV_POSTGRES_USER=odoo",
"DB_ENV_POSTGRES_PASSWORD=odoo"]
}
任何想法?
感谢...
答案 0 :(得分:1)
您的实例看起来缺少filestore中的网络资源。您的Terraform具有Postgres的持久存储空间,但缺少Odoo容器的存储空间。为Odoo文件存储卷添加持久性容器,它将解决此问题。
有关在Odoo容器中使用Docker持久存储的更多信息,请参阅此博客文章:https://unkkuri.com/blog/unkkuri-blog-1/post/install-odoo-version-11-in-docker-container-21。