Skip to content

Instantly share code, notes, and snippets.

@jkeam
Created September 22, 2023 15:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jkeam/906c8f7a808c6e05017dd9925d6b13dd to your computer and use it in GitHub Desktop.
Save jkeam/906c8f7a808c6e05017dd9925d6b13dd to your computer and use it in GitHub Desktop.
Example DevFile for Rails
schemaVersion: 2.2.0
metadata:
name: rails-blog
attributes:
controller.devfile.io/devworkspace-config:
name: special-workspaces-config
namespace: l0rd-che
components:
- name: bundle-volume
volume:
size: 1G
- name: devtools
container:
image: quay.io/mloriedo/rails-blog-cde:latest
memoryRequest: 2G
memoryLimit: 4G
cpuRequest: '1'
cpuLimit: '2'
env:
- name: RAILS_DEVELOPMENT_HOSTS
value: '.apps.che-dev.x6e0.p1.openshiftapps.com'
volumeMounts:
- name: bundle-volume
path: /home/user/.bundle/vendor
endpoints:
- name: blog
exposure: public
protocol: http
targetPort: 3000
path: /articles
commands:
- id: bundle-install
exec:
component: devtools
commandLine: bundle install
workingDir: ${PROJECT_SOURCE}
- id: server-start
exec:
component: devtools
commandLine: bin/rails server -binding 0.0.0.0
events:
postStart:
- bundle-install
@jkeam
Copy link
Author

jkeam commented Sep 22, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment