Created
February 10, 2016 02:12
-
-
Save bueller/eb86a221d454e75224b7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
replicated_api_version: "1.3.1" | |
name: My Counter App | |
version: "1.0" | |
release_notes: This is my killer on-prem version of my app | |
properties: | |
app_url: http://{{repl ConfigOption "hostname" }} | |
logo_url: "" | |
console_title: My App Console | |
state: | |
ready: | |
command: http_status_code | |
args: | |
- http://{{repl ConfigOption "hostname"}}/assets/bootstrap.min.css | |
- "200" | |
components: | |
- name: DB | |
containers: | |
- source: public | |
image_name: redis | |
version: latest | |
cmd: "[\"redis-server\", \"--appendonly\", \"yes\"]" | |
publish_events: | |
- name: Container redis started | |
trigger: container-start | |
data: "" | |
subscriptions: | |
- component: App | |
container: freighter/counter | |
action: start | |
config_files: [] | |
customer_files: [] | |
env_vars: [] | |
ports: [] | |
volumes: | |
- host_path: /data | |
container_path: /data:rw | |
support_files: [] | |
- name: LB | |
containers: | |
- source: public | |
image_name: nginx | |
version: latest | |
cmd: "" | |
config_files: | |
- filename: /etc/nginx/conf.d/default.conf | |
contents: | | |
server { | |
listen 80; | |
server_name {{repl ConfigOption "hostname" }}; | |
keepalive_timeout 70; | |
location / { | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $remote_addr; | |
proxy_set_header Host $host; | |
proxy_pass http://{{repl HostPrivateIpAddress "App" "freighter/counter" }}:{{repl ContainerExposedPort "App" "freighter/counter" "3000" }}; | |
} | |
} | |
env_vars: [] | |
ports: | |
- private_port: "80" | |
public_port: "80" | |
port_type: tcp | |
volumes: [] | |
support_files: [] | |
- name: App | |
containers: | |
- source: public | |
image_name: freighter/counter | |
display_name: Freighter Counter | |
version: "1.0" | |
cmd: "" | |
publish_events: | |
- name: Container freighter/counter started | |
trigger: container-start | |
data: "" | |
subscriptions: | |
- component: LB | |
container: nginx | |
action: start | |
config_files: [] | |
customer_files: [] | |
env_vars: | |
- name: REDIS_HOST | |
static_val: "{{repl HostPrivateIpAddress \"DB\" \"redis\" }}" | |
- name: REDIS_PORT | |
static_val: "{{repl ContainerExposedPort \"DB\" \"redis\" \"6379\" }}" | |
ports: [] | |
volumes: [] | |
support_files: [] | |
config: | |
- name: hostname | |
title: Hostname | |
description: Ensure this domain name is routable on your network. | |
items: | |
- name: hostname | |
title: Hostname | |
type: text | |
required: true | |
items: [] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment