Skip to content

Instantly share code, notes, and snippets.

@wshihadeh
Last active April 25, 2020 15:42
Show Gist options
  • Save wshihadeh/0ff73c28c5fd19b7df91ac3ec241a5c2 to your computer and use it in GitHub Desktop.
Save wshihadeh/0ff73c28c5fd19b7df91ac3ec241a5c2 to your computer and use it in GitHub Desktop.
Rails Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: rails
name: rails
spec:
replicas: 1
selector:
matchLabels:
app: rails-pod
template:
metadata:
labels:
app: rails-pod
spec:
containers:
- name: rails
env:
- name: DATABASE_URL
value: mysql2://root:dummy@mysqldb-service:3306/rails_blog_production
- name: RAILS_SERVE_STATIC_FILES
value: 'true'
image: wshihadeh/rails_blog:demo-v1
args: ['web']
ports:
- containerPort: 8080
restartPolicy: Always
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment