Skip to content

Commit

Permalink
Split docker-compose.yml into multiple files for ARGoS/Crazyflie diff…
Browse files Browse the repository at this point in the history
…erences
  • Loading branch information
KRMisha committed Apr 12, 2021
1 parent 9e790df commit ba0922b
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 36 deletions.
21 changes: 21 additions & 0 deletions docker-compose.argos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: "3.8"

services:
server:
command: argos
volumes:
- socket:/tmp/hivexplore # TODO: Document this directory # TODO: Check if /tmp/ is conventional for socket location inside container

argos:
build: ./argos
image: hivexplore/argos
volumes:
- $XSOCKET:$XSOCKET
- $XAUTHORITY:$XAUTHORITY
- socket:/tmp/hivexplore # TODO: Document this directory
environment:
DISPLAY: $DISPLAY
XAUTHORITY: $XAUTHORITY

volumes:
socket:
6 changes: 6 additions & 0 deletions docker-compose.drone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: "3.8"

services:
server:
devices:
- /dev/bus/usb
42 changes: 7 additions & 35 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,22 @@
version: "3.8"

x-server:
&server-base
build: ./server
image: hivexplore/server
ports:
- 5678:5678
volumes:
- logs:/hivexplore/logs # TODO: Change server code to use different directory (env variable maybe?)

services:
client:
build: ./client
image: hivexplore/client
ports:
- 3995:80

server_crazyflie:
<< : *server-base
profiles: ["crazyflie"]
devices:
- /dev/bus/usb

server_argos:
<< : *server-base
profiles: ["argos"]
command: argos
volumes:
- socket:/tmp/hivexplore # TODO: Document this directory # TODO: Check if /tmp/ is conventional for socket location inside container

argos:
build: ./argos
image: hivexplore/argos
profiles: ["argos"]
server:
build: ./server
image: hivexplore/server
ports:
- 5678:5678
volumes:
- $XSOCKET:$XSOCKET
- $XAUTHORITY:$XAUTHORITY
- socket:/tmp/hivexplore # TODO: Document this directory
environment:
DISPLAY: $DISPLAY
XAUTHORITY: $XAUTHORITY
- logs:/hivexplore/logs # TODO: Change server code to use different directory (env variable maybe?)

volumes:
socket:
logs:
# TODO: Rename volumes?
# TODO: Multiple volumes or one volume?
# TODO: Fix permission issue, maybe this link: https://stackoverflow.com/questions/24288616/permission-denied-on-accessing-host-directory-in-docker
# TODO: Profiles?

4 changes: 3 additions & 1 deletion start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ echo $x_env
export $x_env

echo Running Docker Compose
docker-compose up
docker-compose -f docker-compose.yml -f docker-compose.argos.yml up

# TODO: Arguments

0 comments on commit ba0922b

Please sign in to comment.