-
-
Save mazz/a822d1b684e12da7c383856e6923e540 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
HOST=localhost | |
DATABASE_URL=ecto://nevermind:nevermind@olivetree-db/olivetree_prod?pool_size=15 | |
PORT=5000 | |
POSTGRES_USER=nevermind | |
POSTGRES_PASSWORD=nevermind | |
POSTGRES_DB=olivetree_prod | |
POSTGRES_HOST=postgres | |
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
version: "3" | |
services: | |
db: | |
image: postgres:10.4-alpine | |
container_name: olivetree-db | |
networks: | |
- nginx-network | |
admin: | |
image: olivetree-release | |
container_name: olivetree-admin | |
build: | |
context: . | |
dockerfile: Dockerfile.run | |
command: migrate | |
networks: | |
- nginx-network | |
depends_on: | |
- db | |
server: | |
image: olivetree-release | |
container_name: olivetree-server | |
expose: | |
- "5000" | |
command: foreground | |
networks: | |
- nginx-network | |
depends_on: | |
- db | |
- admin | |
networks: | |
nginx-network: | |
external: true |
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
use Mix.Config | |
# For production, we often load configuration from external | |
# sources, such as your system environment. For this reason, | |
# you won't find the :http configuration below, but set inside | |
# OlivetreeWeb.Endpoint.init/2 when load_from_system_env is | |
# true. Any dynamic configuration should be done there. | |
# | |
# Don't forget to configure the url host to something meaningful, | |
# Phoenix uses this information when generating URLs. | |
# | |
# Finally, we also include the path to a cache manifest | |
# containing the digested version of static files. This | |
# manifest is generated by the mix phx.digest task | |
# which you typically run after static files are built. | |
config :olivetree, OlivetreeWeb.Endpoint, | |
http: [:inet6, port: {:system, "PORT"}], | |
load_from_system_env: false, | |
url: [host: {:system, "HOST"}, port: {:system, "PORT"}, compress: true], | |
server: true, | |
root: ".", | |
version: Application.spec(:olivetree, :vsn), | |
cache_static_manifest: "priv/static/cache_manifest.json" | |
# Do not print debug messages in production | |
config :logger, level: :info | |
# ## SSL Support | |
# | |
# To get SSL working, you will need to add the `https` key | |
# to the previous section and set your `:url` port to 443: | |
# | |
# config :olivetree, OlivetreeWeb.Endpoint, | |
# ... | |
# url: [host: "example.com", port: 443], | |
# https: [:inet6, | |
# port: 443, | |
# keyfile: System.get_env("SOME_APP_SSL_KEY_PATH"), | |
# certfile: System.get_env("SOME_APP_SSL_CERT_PATH")] | |
# | |
# Where those two env variables return an absolute path to | |
# the key and cert in disk or a relative path inside priv, | |
# for example "priv/ssl/server.key". | |
# | |
# We also recommend setting `force_ssl`, ensuring no data is | |
# ever sent via http, always redirecting to https: | |
# | |
# config :olivetree, OlivetreeWeb.Endpoint, | |
# force_ssl: [hsts: true] | |
# | |
# Check `Plug.SSL` for all available options in `force_ssl`. | |
# ## Using releases | |
# | |
# If you are doing OTP releases, you need to instruct Phoenix | |
# to start the server for all endpoints: | |
# | |
# config :phoenix, :serve_endpoints, true | |
# | |
# Alternatively, you can configure exactly which server to | |
# start per endpoint: | |
# | |
# config :olivetree, OlivetreeWeb.Endpoint, server: true | |
# | |
config :olivetree, Olivetree.Mailer, | |
adapter: Bamboo.MailgunAdapter, | |
api_key: "nevermind", | |
domain: "nevermind" | |
config :olivetree, OlivetreeWeb.Guardian, | |
secret_key: "nevermind", | |
issuer: "Olivetree", | |
token_ttl: %{ | |
"magic" => {30, :minutes}, | |
"access" => {1, :days} | |
} | |
# Finally import the config/prod.secret.exs | |
# which should be versioned separately. | |
import_config "prod.secret.exs" |
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
use Mix.Config | |
# In this file, we keep production configuration that | |
# you'll likely want to automate and keep away from | |
# your version control system. | |
# | |
# You should document the content of this | |
# file or create a script for recreating it, since it's | |
# kept out of version control and might be hard to recover | |
# or recreate for your teammates (or yourself later on). | |
config :olivetree, Olivetree.Endpoint, | |
secret_key_base: "nevermind" | |
# Configure your database | |
config :olivetree, Olivetree.Repo, | |
adapter: Ecto.Adapters.Postgres, | |
username: "nevermind", | |
password: "nevermind", | |
hostname: "olivetree-db", | |
database: "olivetree_prod", | |
pool_size: 15 | |
config :olivetree, Olivetree.Repo, | |
url: System.get_env("DATABASE_URL") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment