Git Product home page Git Product logo

atmosphere-docker's Introduction

Atmosphere Docker

Entire Atmosphere development environment in Docker Containers using Docker-Compose.

Getting started

  1. Clone this repository in the same directory as Troposphere, Atmosphere, and Atmosphere Ansible repositories (these must be present for this to work properly)

    • Alternatively, modify the docker-compose file to point to your local repositories with either relative or absolute paths
  2. atmosphere-docker.sh pull to pull all containers

    • To populate with an existing Atmosphere database, copy the *.sql file to the postgres directory
    • To populate with a Troposphere database, copy the tropo*.sql.dump file to the postgres directory. If the file is a *.sql file, the postgres image will attempt to dump it into the Atmosphere database instead of the Troposphere database
  3. Clone the atmosphere-docker-secrets repository in the same directory as this repository (not inside this repository directory)

    • Checkout branch with the correct variables for your environment
    • Use the script mock_user.sh <your_cyverse_username> to change MOCK_USER variable in atmosphere.ini and troposphere.ini to your username if using 'local' variables branch
  4. atmosphere-docker.sh up to start all containers (use the -d option to run containers in the background)

    • The container's entrypoint will automatically read a variable from the env file in atmosphere-docker-secrets to determine if running a production or development environment
    • If you are using a local development version and want Guacamole also, replace the atmosphere-docker.sh part of all commands with: atmosphere-docker.sh -f docker-compose.yml -f docker-compose.guac.yml
    • If using local development version:
      • IMPORTANT: If you are using Linux and want to maintain ownership of your local repositories, edit the command lines in docker-compose.yml with your user id (use id -u to get this). User ID 1000 is the default
      • Your containers should be ready when you see webpack: Compiled successfully. from Troposphere and Starting Django Python... from Atmosphere
      • Access Atmosphere in your browser at localhost
      • Troposphere and Atmosphere changes will be automatically built

NOTE: Since this directly uses your local directories for Atmosphere, Troposphere, and Atmosphere-Ansible, these directories will be modified to have things like updated settings files, *.pyc files and others present in the .gitignore files. To clean up your directory and delete all files recognized by gitignore, run git clean -fdx

Variables ini files in atmosphere-docker-secrets are linked to the files used by Atmosphere, Troposphere, and Atmosphere-Ansible so you can easily modify those files locally and have them accessible by the services that use them. Easily re-run the configure scripts with these commands:

# Configure Troposphere
docker exec -ti $(docker ps -f name=troposphere --format "{{.Names}}") /opt/env/troposphere/bin/python configure

# Configure Atmosphere
docker exec -ti $(docker ps -f name=atmosphere_ --format "{{.Names}}") /opt/env/atmosphere/bin/python configure

# Configure Atmosphere-Ansible
docker exec -ti $(docker ps -f name=atmosphere_ --format "{{.Names}}") /opt/env/atmosphere/bin/python /opt/dev/atmosphere-ansible/configure

# Access Atmosphere Django shell
docker exec -ti $(docker ps -f name=atmosphere_ --format "{{.Names}}") /opt/env/atmo/bin/python manage.py shell

Tips

Gracefully shut down containers with Ctrl+c. Press it again to kill containers.

Or kill all containers with atmosphere-docker.sh kill.

Delete all containers when you are done with atmosphere-docker.sh rm.

Delete all unattached volumes with docker volume prune.

NOTE: When the logs/ directory is created by Docker Compose it will be owned by root so you cannot delete it without sudo. However, rm -rf logs will delete all of the files but the directory structure will remain. If you create the logs directory before running the containers, you can easily delete it.

atmosphere-docker's People

Contributors

zhxu73 avatar npurcella avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.