Skip to content

Commit

Permalink
Add volume for binary resources
Browse files Browse the repository at this point in the history
  • Loading branch information
awlayton committed Mar 12, 2021
1 parent 2d1a219 commit bbca2de
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ services:
- '8080'
environment:
- IGNORE_SCOPE
volumes:
# Storage for non-JSON resources
- binary_data:/oada/binary

sync-handler:
extends:
Expand Down Expand Up @@ -239,6 +242,7 @@ services:

volumes:
arangodb_data:
binary_data:
arangodb_apps_data:
kafka_data:
zookeeper_data:
Expand Down
4 changes: 4 additions & 0 deletions oada/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ COPY --from=yarn /oada/ /oada/
# TODO: Don't have both source and built code in image?
COPY --from=build /oada/ /oada/

# Add volume for Binary data and chown to node?
RUN mkdir -p /oada/binary && chown node:node /oada/binary
VOLUME /oada/binary

# Do not run services as root
USER node

Expand Down
7 changes: 7 additions & 0 deletions oada/oada-srvc-docker-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ module.exports = {
mode: 'http',
},

storage: {
binary: {
// TODO: Where should this live??
cacache: '/oada/binary',
},
},

arangodb: {
connectionString: 'http://arangodb:8529',
database: 'oada',
Expand Down
3 changes: 3 additions & 0 deletions release/docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ services:
environment:
<<: *env
IGNORE_SCOPE:
volumes:
# Storage for non-JSON resources
- binary_data:/oada/binary

sync-handler:
environment:
Expand Down

0 comments on commit bbca2de

Please sign in to comment.