diff --git a/.dockerignore b/.dockerignore index 3d9405d..99f63e7 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,3 +4,7 @@ log/* tmp/* vendor/bundle/* + + +# Ignore devspace.yaml file to prevent image rebuilding after config changes +devspace.yaml diff --git a/.gitignore b/.gitignore index 07cf8a5..724fb87 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,8 @@ # Ignore bundler config. /.bundle +vendor/bundle/* + # Ignore the default SQLite database. /db/*.sqlite3 /db/*.sqlite3-journal @@ -24,3 +26,7 @@ .env.* !.env.example !.env.travis + + +# Ignore DevSpace cache and log folder +.devspace/ diff --git a/README.md b/README.md index eb6871d..cbef50a 100644 --- a/README.md +++ b/README.md @@ -5,17 +5,15 @@ Rails API application for conversion of DOI metadata form/to other metadata formats, including [schema.org](https://schema.org). Based on the [bolognese](https://github.com/datacite/bolognese) library for metadata conversion. - ## Installation - Using Docker. There is no required configuration file. ``` -docker run -p 8090:80 crosscite/content-negotiation +docker run -p 8085:80 crosscite/content-negotiation ``` -You can now point your browser to `http://localhost:8090` and use the application. +You can now point your browser to `http://localhost:8085` and use the application. This is an API with no user interface. ## Development diff --git a/devspace.yaml b/devspace.yaml new file mode 100755 index 0000000..803d198 --- /dev/null +++ b/devspace.yaml @@ -0,0 +1,47 @@ +version: v1beta9 +images: + app: + image: crosscite/content-negotiation + preferSyncOverRebuild: true + injectRestartHelper: true + appendDockerfileInstructions: + - USER root +deployments: +- name: content-negotiation + helm: + componentChart: true + values: + containers: + - image: crosscite/content-negotiation + service: + ports: + - port: 80 +dev: + ports: + - imageName: app + forward: + - port: 8085 + remotePort: 80 + open: + - url: http://localhost:8085 + sync: + - imageName: app + excludePaths: + - .git/ + uploadExcludePaths: + - .env + - .env.* + - .bundle + - log/* + - tmp/* + - vendor/bundle/* + - devspace.yaml + onUpload: + restartContainer: true +profiles: +- name: production + patches: + - op: remove + path: images.app.injectRestartHelper + - op: remove + path: images.app.appendDockerfileInstructions diff --git a/docker-compose.yml b/docker-compose.yml index 610c217..de2a4d7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,11 +1,11 @@ -version: '2' +version: '3' services: web: image: crosscite/content-negotiation build: . ports: - - "8090:80" + - "8085:80" networks: - public volumes: @@ -16,11 +16,3 @@ services: image: memcached:1.4.31 networks: - public -networks: - public: - driver: bridge - ipam: - driver: default - config: - - subnet: 10.0.30.0/24 - gateway: 10.0.30.1