Skip to content

Commit

Permalink
Add ARGoS service to docker-compose.yml and create Bash script for x1…
Browse files Browse the repository at this point in the history
…1docker
  • Loading branch information
KRMisha committed Apr 12, 2021
1 parent 24a01fc commit 3652419
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ services:
image: hivexplore/client
ports:
- 3995:80

server:
image: hivexplore/server
command: argos # TODO: Crazyflie vs ARGoS args? How to pass args to Docker Compose?
Expand All @@ -13,3 +14,13 @@ services:
volumes:
- /tmp/hivexplore:/tmp/hivexplore # TODO: Document this directory
- /tmp/logs:/hivexplore/logs # TODO: Change server code to use different directory (env variable maybe?)

argos:
image: hivexplore/argos
volumes:
- $XSOCKET:$XSOCKET
- $XAUTHORITY:$XAUTHORITY
- /tmp/hivexplore:/tmp/hivexplore # TODO: Document this directory
environment:
DISPLAY: $DISPLAY
XAUTHORITY: $XAUTHORITY
19 changes: 19 additions & 0 deletions start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

# Shell script necessary to initialize x11docker before starting containers
# with Docker Compose. See https://github.com/mviereck/x11docker/issues/227

function exit_handler() {
echo Cleaning up x11docker
x11docker --cleanup --quiet
}

trap exit_handler EXIT

echo Initializing x11docker
read x_env < <(x11docker --hostdisplay --showenv --quiet)
echo $x_env
export $x_env

echo Running Docker Compose
docker-compose up

0 comments on commit 3652419

Please sign in to comment.