-
Notifications
You must be signed in to change notification settings - Fork 201
/
.env.example
139 lines (118 loc) · 5.74 KB
/
.env.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# Default values are optimized for production to avoid having to configure
# much in production.
#
# However it should be easy to get going in development too. If you see an
# uncommented option that means it's either mandatory to set or it's being
# overwritten in development to make your life easier.
# Enable BuildKit by default:
# https://docs.docker.com/develop/develop-images/build_enhancements
export DOCKER_BUILDKIT=1
# Rather than use the directory name, let's control the name of the project.
export COMPOSE_PROJECT_NAME=hellorails
# In development we want all services to start but in production you don't
# need the asset watchers to run since assets get built into the image.
#
# You can even choose not to run postgres and redis in prod if you plan to use
# managed cloud services. Everything "just works", even optional depends_on!
#export COMPOSE_PROFILES=postgres,redis,web,worker,cable
export COMPOSE_PROFILES=postgres,redis,assets,web,worker,cable
# If you're running native Linux and your uid:gid isn't 1000:1000 you can set
# these to match your values before you build your image. You can check what
# your uid:gid is by running `id` from your terminal.
#export UID=1000
#export GID=1000
# You can generate a more secure secret by running: ./run rails secret
export SECRET_KEY_BASE=insecure_key_for_dev
# Which environment is running? These should be "development" or "production".
#export RAILS_ENV=production
#export NODE_ENV=production
export RAILS_ENV=development
export NODE_ENV=development
# The bind port for puma.
#
# Be warned that if you change this value you'll need to change 8000 in both
# your Dockerfile and in a few spots in compose.yaml due to the nature of
# how this value can be set (Docker Compose doesn't support nested ENV vars).
#export PORT=8000
# How many workers and threads should your app use? WEB_CONCURRENCY defaults
# to the server's CPU count * 2. That is a good starting point. In development
# it's a good idea to use 1 to avoid race conditions when debugging.
#export WEB_CONCURRENCY=
#export RAILS_MAX_THREADS=3
export WEB_CONCURRENCY=1
export RAILS_MAX_THREADS=1
# You'll always want to set POSTGRES_USER and POSTGRES_PASSWORD since the
# postgres Docker image uses them for its default database user and password.
export POSTGRES_USER=hello
export POSTGRES_PASSWORD=password
#export POSTGRES_DB=hello
#export POSTGRES_HOST=postgres
#export POSTGRES_PORT=5432
# What's your full Redis connection URL? This will be used for caching, Sidekiq,
# and Action Cable. You can always split them up later.
#export REDIS_URL=redis://redis:6379/1
# The bind port for puma but for Action Cable.
#
# Be warned that if you change this value you'll need to change 28080 in a few
# spots in compose.yaml due to the nature of how this value can be set
# (Docker Compose doesn't support nested ENV vars).
#export CABLE_PORT=28080
# The Action Cable address that will be accessible over HTTP. In production
# you would typically have this reverse proxied to a sub-domain with nginx, in
# which case you would set something like: ws://cable.example.com
#
# This is one case where it defaults to a development value because it's not
# possible for me to know what domain name you'll be using.
#export ACTION_CABLE_FRONTEND_URL=ws://localhost:28080
# Comma separated list of RegExp origins to allow connections from for Action
# Cable. The values will be converted into a proper RegExp, so omit the / /.
#
# Examples:
# http:\/\/localhost*
# http:\/\/example.*,https:\/\/example.*
#export ACTION_CABLE_ALLOWED_REQUEST_ORIGINS=http:\/\/localhost*
# Various functionality in Rails requires setting a host URL, in production
# this should match your domain name, such as example.com.
#export URL_HOST=localhost:8000
# If this is set then Rails will serve files from public/ in production. You
# probably don't want this behavior unless you're testing prod mode locally,
# because nginx would typically serve static files.
#export RAILS_SERVE_STATIC_FILES=
# Should Docker restart your containers if they go down in unexpected ways?
#export DOCKER_RESTART_POLICY=unless-stopped
export DOCKER_RESTART_POLICY=no
# What health check test command do you want to run? In development, having it
# curl your web server will result in a lot of log spam, so setting it to
# /bin/true is an easy way to make the health check do basically nothing.
#export DOCKER_WEB_HEALTHCHECK_TEST=curl localhost:8000/up
export DOCKER_WEB_HEALTHCHECK_TEST=/bin/true
# What ip:port should be published back to the Docker host for the app server?
#
# If you have a port conflict because something else is using 8000 then you
# can either stop that process or change 8000 to be something else.
#
# Use the default in production to avoid having puma directly accessible on
# the internet since it'll very likely be behind nginx or a load balancer.
#
# This is being overwritten in dev to be compatible with more dev environments,
# such as accessing your site on another local device (phone, tablet, etc.).
export DOCKER_WEB_PORT_FORWARD=8000
# This is the same as above except for Action Cable.
#export DOCKER_CABLE_PORT_FORWARD=127.0.0.1:28080
export DOCKER_CABLE_PORT_FORWARD=28080
# What volume path should be used? In dev we want to volume mount everything
# so that we can develop our code without rebuilding our Docker images.
#export DOCKER_WEB_VOLUME=./public:/app/public
export DOCKER_WEB_VOLUME=.:/app
# What CPU and memory constraints will be added to your services? When left at
# 0 they will happily use as much as needed.
# export DOCKER_POSTGRES_CPUS=0
# export DOCKER_POSTGRES_MEMORY=0
# export DOCKER_REDIS_CPUS=0
# export DOCKER_REDIS_MEMORY=0
# export DOCKER_WEB_CPUS=0
# export DOCKER_WEB_MEMORY=0
# export DOCKER_WORKER_CPUS=0
# export DOCKER_WORKER_MEMORY=0
# export DOCKER_CABLE_CPUS=0
# export DOCKER_CABLE_MEMORY=0