Last active
August 4, 2019 19:23
-
-
Save heymatthew/4321b49de80ad67553f13e2ae5ad7f36 to your computer and use it in GitHub Desktop.
Docker for CoNZealand
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
members.conzealand.nz { | |
log stdout | |
errors stdout | |
proxy / members_production:3000 { | |
transparent | |
} | |
} | |
members-staging.conzealand.nz { | |
log stdout | |
errors stdout | |
basicauth / staginguser "super duper secret password" | |
proxy / members_staging:3000 { | |
transparent | |
} | |
} |
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
# Copyright 2019 James Polley | |
# Copyright 2019 Steven C Hartley | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
version: '3.6' | |
services: | |
ingress: | |
image: "abiosoft/caddy" | |
ports: | |
- "80:80" | |
- "443:443" | |
volumes: | |
- ./Caddyfile:/etc/Caddyfile:ro | |
- ssl-certs:/root/.caddy:rw | |
environment: | |
# https://github.com/abiosoft/caddy-docker#lets-encrypt-subscriber-agreement | |
ACME_AGREE: "true" | |
restart: always | |
members_production: | |
# command: bash -c "bundle exec rake db:migrate && bundle exec rails server -b 0.0.0.0" | |
env_file: | |
production.env | |
image: registry.gitlab.com/worldcon/2020-wellington:stable | |
restart: always | |
volumes: | |
- type: tmpfs | |
target: /app/tmp | |
members_staging: | |
# command: bash -c "bundle exec rake db:migrate && bundle exec rails server -b 0.0.0.0" | |
env_file: | |
staging.env | |
image: registry.gitlab.com/worldcon/2020-wellington:latest | |
restart: always | |
volumes: | |
- type: tmpfs | |
target: /app/tmp | |
volumes: | |
ssl-certs: |
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
HOSTNAME=members-staging.conzealand.nz | |
RAILS_ENV=production | |
DB_HOST=conzealand.abc123.ap-southeast-2.rds.amazonaws.com | |
DB_NAME=worldcon_staging | |
POSTGRES_USER=postgres | |
POSTGRES_PASSWORD=abc123 | |
STRIPE_PUBLIC_KEY=pk_test_dobliydo | |
STRIPE_PRIVATE_KEY=sk_test_dobliydo | |
STRIPE_CURRENCY=NZD | |
EMAIL_PAYMENTS=matthew.gray@conzealand.nz | |
JWT_SECRET=veryverysecert | |
DEVISE_SECRET=veryferysecret | |
# https://app.sendgrid.com/settings/api_keys | |
SMTP_SERVER=smtp.sendgrid.net | |
# SMTP_PORT=465 | |
SMTP_PORT=587 | |
SMTP_USER_NAME=apikey | |
SMTP_PASSWORD=OMGSOSECRET |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment