Skip to content

Commit

Permalink
adding devspaces configuration datacite/datacite#1142
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Nov 6, 2020
1 parent 58623b4 commit 79e36cf
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 14 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
log/*
tmp/*
vendor/bundle/*


# Ignore devspace.yaml file to prevent image rebuilding after config changes
devspace.yaml
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
# Ignore bundler config.
/.bundle

vendor/bundle/*

# Ignore the default SQLite database.
/db/*.sqlite3
/db/*.sqlite3-journal
Expand All @@ -24,3 +26,7 @@
.env.*
!.env.example
!.env.travis


# Ignore DevSpace cache and log folder
.devspace/
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
47 changes: 47 additions & 0 deletions devspace.yaml
Original file line number Diff line number Diff line change
@@ -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
12 changes: 2 additions & 10 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
version: '2'
version: '3'

services:
web:
image: crosscite/content-negotiation
build: .
ports:
- "8090:80"
- "8085:80"
networks:
- public
volumes:
Expand All @@ -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

0 comments on commit 79e36cf

Please sign in to comment.