Reputation:
This is the error of the vps server:
The web page of the web program is not shown, or it is incomplete. It is hosted on a vps server and it runs in a docker container that shows ports 8070 and 8071 respectively.
How can I make them visualize correctly?
Is it a problem with the database?
Is it a memory problem or server performance?
:::: this is my code 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"]
}
any idea?
thanks...
Upvotes: 2
Views: 331
Reputation: 3620
Looks like your instance is missing web assets in filestore. Your Terraform has persistent storage for Postgres, but is missing storage for Odoo container. Add persistence to your containers for Odoo filestore volume and it will solve this problem.
More information on using Docker persistent storage with Odoo container can be found from this blog post: https://unkkuri.com/blog/unkkuri-blog-1/post/install-odoo-version-11-in-docker-container-21.
Upvotes: 2