I was wondering if anyone had experience setting up a staging environment on a localhost that would almost identically mimic the live, online set up…
I have the docker-compose.yaml
file along with the .env
file, after doing some research, I have found that there is a docker-compose.override.yaml that can be used for this sort of thing.
I just want to check that in order to mimic the online set up to be able to check for upgrade issues etc that the docker-compose.override.yaml
should have:
Version: '3.5'
server:
environment:
VIRTUAL_HOST: "localhost"
webapp:
environment:
API_BASEURL: "localhost/api"
VIRTUAL_HOST: localhost
The Docker-compose.yaml file (incase needed to compare)
version: '3.5'
services:
db:
image: percona:8.0
restart: on-failure
environment:
# To be picked up by percona image when creating the database
# Must match with DB_DSN settings inside .env
MYSQL_DATABASE: database
MYSQL_USER: user
MYSQL_PASSWORD: sqlpass
MYSQL_ROOT_PASSWORD: rootpass
# healthcheck: { test: ["CMD", "mysqladmin" ,"ping", "-h", "77.68.90.188"], timeout: 20s, retries: 10 }
# Uncomment to use local fs for data persistence
volumes: [ "./data/db:/var/lib/mysql" ]
networks: [ internal ]
server:
image: cortezaproject/corteza-server:latest
restart: on-failure
env_file: [ .env ]
environment:
# Informing Corredor where it he contact us
CORREDOR_ADDR: "corredor:80"
VIRTUAL_HOST: "https://subdomain.domain.tld"
depends_on: [ db, corredor ]
volumes: [ "./data/server:/data" ]
healthcheck: { test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"], timeout: 20s, retries: 10 }
ports: [ "127.0.0.1:30500:80" ]
networks: [ internal ]
corredor:
image: cortezaproject/corteza-server-corredor:latest
restart: on-failure
env_file: [ .env ]
environment:
# Informing Corredor where it he contact us
CORREDOR_ADDR: "corredor:80"
# Binds internal port to port LOCAL_DEMO_CRD_PORT on localhost
networks: [ internal ]
volumes: [ "./corredor:/corredor/usr" ]
webapp:
image: cortezaproject/corteza-webapp:latest
restart: on-failure
depends_on: [ server ]
environment:
# Monolith server in the backend, all services can be found under one base URL
MONOLITH_API: 1
# Configure web application with API location
API_BASEURL: "api-subdomain.domain.tld"
VIRTUAL_HOST: subdomain.domain.tld
ports: [ "127.0.0.1:30501:80" ]
networks:
internal: {}