- Create a new directory for your installation (Ex: test_copy)
cd
into that directory- Assuming this directory is created at the same level as the existing
geoglows
directory, copy the folderstethys_files
anddb_files_snapshot
and thedocker-compose
filecp -R ../geoglows/db_files_snapshot ./ cp -R ../geoglows/tethys_files/ ./ cp ../geoglows/docker-compose.yml ./
version: "3.4"
services:
tethys:
container_name: test_copy #Change the name here
image: geoglows:latest
volumes:
- ../geoglows/thredds:/usr/lib/thredds #Change this line if needed to represent the correct thredds path
- ./tethys_files:/usr/lib/tethys
ports:
- "8004:80" #CHANGE the port on which this portal is being hosted
environment:
CONDA_HOME: /opt/conda
ALLOWED_HOSTS: '"[''127.0.0.1'', ''localhost'']"'
TETHYS_SUPER_USER: "admin"
TETHYS_SUPER_USER_PASS: "pass"
links:
- db
depends_on:
- db
db:
image: geoglows_db:latest
container_name: test_copy_db #Change the name here
restart: always
volumes:
- ./db_files_snapshot:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: pass123
POSTGRES_USER: tethys_admin
Also Update the settings.py in your current tethys_files directory :
LOGIN_URL = "/test_copy/accounts/login"
STATIC_URL = '/test_copy/static/'
Please follow the instructions in the deploying tethys portal docs to do this.
Restart nginx :
sudo service nginx restart
Remember NOT to run this with the --build
tag
docker-compose -p test_copy up -d
That should be it. You should be able to go to your host/test_copy and see the portal come up.