-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the server runnable in production env
Don't autoload templates. These are just used as generators and will fail with syntax errors at autoload time in the production env. Don't add environmnet-specific encrypted credentials keys to the repo. - Also, we needed to check in config/credentials/production.yml.enc. Fix the schema dumps for the solid trifecta to use *_structure.sql, as expected in this app (as per the application config: `config.active_record.schema_format = :sql`). - This was required to get the database tables built when running e.g. `RAILS_ENV=production DB_PASSWORD=<password> rails db:create` ... and friends. - Basically, there's no other way that the databases for the solid_* gems can be created/added (we don't have their migration files). - See: rails/solid_cache#228
- Loading branch information
Showing
10 changed files
with
1,098 additions
and
200 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
yDaM7cxL47Q/z3xc+I9Izm/LoSyele5jMaPT33ugHbeLNOvwx+gGh2D6TzIdKVcjO/L3M1S8GGT209kqntJcAs0/iNPO04IKstcPYdDc4pqzaw5xq8ND+hMQ+o42luaoXBNwE0yqxsX0E+4Aq4jyU2uPn7lm0XRCbykee1KENlFX7lwbuvDAHyUFMRkaxhNeNHFQotp+tw+HBhYmSXDpfzpC2DdmsncOXX68chtIE9/kirecF5yV1VW7d6N88gZRmiK60jHdPR/DriDvCNBGLyCgnuPabW870CckmAiTJKFf/nsGUh4Fq4e908oxrR0LoY2ItP1DXHdlq4Pgp1+fkt7jrDzaNwnjx4OqLmx+y+wzIXXF0LaQ0Hix5tADmETXfRNNV67sJZ34UNn/0tQ5vPAy4JqHTLv2pLJHbpw3d7WyXeDmj4hCMJSK2vNililgXSGXtmMUjoXYFwTQ1+UfoAbl1u3sXv1Mg6srzq1J9ZHdPRNn1oZyPz1q--pZqoLx0eufR0I5a3--7n4oId0EAaQAtUYeuRfhRg== |
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
SET statement_timeout = 0; | ||
SET lock_timeout = 0; | ||
SET idle_in_transaction_session_timeout = 0; | ||
SET transaction_timeout = 0; | ||
SET client_encoding = 'UTF8'; | ||
SET standard_conforming_strings = on; | ||
SELECT pg_catalog.set_config('search_path', '', false); | ||
SET check_function_bodies = false; | ||
SET xmloption = content; | ||
SET client_min_messages = warning; | ||
SET row_security = off; | ||
|
||
SET default_tablespace = ''; | ||
|
||
SET default_table_access_method = heap; | ||
|
||
-- | ||
-- Name: ar_internal_metadata; Type: TABLE; Schema: public; Owner: - | ||
-- | ||
|
||
CREATE TABLE public.ar_internal_metadata ( | ||
key character varying NOT NULL, | ||
value character varying, | ||
created_at timestamp(6) with time zone NOT NULL, | ||
updated_at timestamp(6) with time zone NOT NULL | ||
); | ||
|
||
|
||
-- | ||
-- Name: schema_migrations; Type: TABLE; Schema: public; Owner: - | ||
-- | ||
|
||
CREATE TABLE public.schema_migrations ( | ||
version character varying NOT NULL | ||
); | ||
|
||
|
||
-- | ||
-- Name: solid_cable_messages; Type: TABLE; Schema: public; Owner: - | ||
-- | ||
|
||
CREATE TABLE public.solid_cable_messages ( | ||
id bigint NOT NULL, | ||
channel bytea NOT NULL, | ||
payload bytea NOT NULL, | ||
created_at timestamp(6) with time zone NOT NULL, | ||
channel_hash bigint NOT NULL | ||
); | ||
|
||
|
||
-- | ||
-- Name: solid_cable_messages_id_seq; Type: SEQUENCE; Schema: public; Owner: - | ||
-- | ||
|
||
CREATE SEQUENCE public.solid_cable_messages_id_seq | ||
START WITH 1 | ||
INCREMENT BY 1 | ||
NO MINVALUE | ||
NO MAXVALUE | ||
CACHE 1; | ||
|
||
|
||
-- | ||
-- Name: solid_cable_messages_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - | ||
-- | ||
|
||
ALTER SEQUENCE public.solid_cable_messages_id_seq OWNED BY public.solid_cable_messages.id; | ||
|
||
|
||
-- | ||
-- Name: solid_cable_messages id; Type: DEFAULT; Schema: public; Owner: - | ||
-- | ||
|
||
ALTER TABLE ONLY public.solid_cable_messages ALTER COLUMN id SET DEFAULT nextval('public.solid_cable_messages_id_seq'::regclass); | ||
|
||
|
||
-- | ||
-- Name: ar_internal_metadata ar_internal_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: - | ||
-- | ||
|
||
ALTER TABLE ONLY public.ar_internal_metadata | ||
ADD CONSTRAINT ar_internal_metadata_pkey PRIMARY KEY (key); | ||
|
||
|
||
-- | ||
-- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: - | ||
-- | ||
|
||
ALTER TABLE ONLY public.schema_migrations | ||
ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version); | ||
|
||
|
||
-- | ||
-- Name: solid_cable_messages solid_cable_messages_pkey; Type: CONSTRAINT; Schema: public; Owner: - | ||
-- | ||
|
||
ALTER TABLE ONLY public.solid_cable_messages | ||
ADD CONSTRAINT solid_cable_messages_pkey PRIMARY KEY (id); | ||
|
||
|
||
-- | ||
-- Name: index_solid_cable_messages_on_channel; Type: INDEX; Schema: public; Owner: - | ||
-- | ||
|
||
CREATE INDEX index_solid_cable_messages_on_channel ON public.solid_cable_messages USING btree (channel); | ||
|
||
|
||
-- | ||
-- Name: index_solid_cable_messages_on_channel_hash; Type: INDEX; Schema: public; Owner: - | ||
-- | ||
|
||
CREATE INDEX index_solid_cable_messages_on_channel_hash ON public.solid_cable_messages USING btree (channel_hash); | ||
|
||
|
||
-- | ||
-- Name: index_solid_cable_messages_on_created_at; Type: INDEX; Schema: public; Owner: - | ||
-- | ||
|
||
CREATE INDEX index_solid_cable_messages_on_created_at ON public.solid_cable_messages USING btree (created_at); | ||
|
||
|
||
-- | ||
-- PostgreSQL database dump complete | ||
-- | ||
|
||
SET search_path TO "$user", public; | ||
|
||
INSERT INTO "schema_migrations" (version) VALUES | ||
('1'); | ||
|
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
SET statement_timeout = 0; | ||
SET lock_timeout = 0; | ||
SET idle_in_transaction_session_timeout = 0; | ||
SET transaction_timeout = 0; | ||
SET client_encoding = 'UTF8'; | ||
SET standard_conforming_strings = on; | ||
SELECT pg_catalog.set_config('search_path', '', false); | ||
SET check_function_bodies = false; | ||
SET xmloption = content; | ||
SET client_min_messages = warning; | ||
SET row_security = off; | ||
|
||
SET default_tablespace = ''; | ||
|
||
SET default_table_access_method = heap; | ||
|
||
-- | ||
-- Name: ar_internal_metadata; Type: TABLE; Schema: public; Owner: - | ||
-- | ||
|
||
CREATE TABLE public.ar_internal_metadata ( | ||
key character varying NOT NULL, | ||
value character varying, | ||
created_at timestamp(6) with time zone NOT NULL, | ||
updated_at timestamp(6) with time zone NOT NULL | ||
); | ||
|
||
|
||
-- | ||
-- Name: schema_migrations; Type: TABLE; Schema: public; Owner: - | ||
-- | ||
|
||
CREATE TABLE public.schema_migrations ( | ||
version character varying NOT NULL | ||
); | ||
|
||
|
||
-- | ||
-- Name: solid_cache_entries; Type: TABLE; Schema: public; Owner: - | ||
-- | ||
|
||
CREATE TABLE public.solid_cache_entries ( | ||
id bigint NOT NULL, | ||
key bytea NOT NULL, | ||
value bytea NOT NULL, | ||
created_at timestamp(6) with time zone NOT NULL, | ||
key_hash bigint NOT NULL, | ||
byte_size integer NOT NULL | ||
); | ||
|
||
|
||
-- | ||
-- Name: solid_cache_entries_id_seq; Type: SEQUENCE; Schema: public; Owner: - | ||
-- | ||
|
||
CREATE SEQUENCE public.solid_cache_entries_id_seq | ||
START WITH 1 | ||
INCREMENT BY 1 | ||
NO MINVALUE | ||
NO MAXVALUE | ||
CACHE 1; | ||
|
||
|
||
-- | ||
-- Name: solid_cache_entries_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - | ||
-- | ||
|
||
ALTER SEQUENCE public.solid_cache_entries_id_seq OWNED BY public.solid_cache_entries.id; | ||
|
||
|
||
-- | ||
-- Name: solid_cache_entries id; Type: DEFAULT; Schema: public; Owner: - | ||
-- | ||
|
||
ALTER TABLE ONLY public.solid_cache_entries ALTER COLUMN id SET DEFAULT nextval('public.solid_cache_entries_id_seq'::regclass); | ||
|
||
|
||
-- | ||
-- Name: ar_internal_metadata ar_internal_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: - | ||
-- | ||
|
||
ALTER TABLE ONLY public.ar_internal_metadata | ||
ADD CONSTRAINT ar_internal_metadata_pkey PRIMARY KEY (key); | ||
|
||
|
||
-- | ||
-- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: - | ||
-- | ||
|
||
ALTER TABLE ONLY public.schema_migrations | ||
ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version); | ||
|
||
|
||
-- | ||
-- Name: solid_cache_entries solid_cache_entries_pkey; Type: CONSTRAINT; Schema: public; Owner: - | ||
-- | ||
|
||
ALTER TABLE ONLY public.solid_cache_entries | ||
ADD CONSTRAINT solid_cache_entries_pkey PRIMARY KEY (id); | ||
|
||
|
||
-- | ||
-- Name: index_solid_cache_entries_on_byte_size; Type: INDEX; Schema: public; Owner: - | ||
-- | ||
|
||
CREATE INDEX index_solid_cache_entries_on_byte_size ON public.solid_cache_entries USING btree (byte_size); | ||
|
||
|
||
-- | ||
-- Name: index_solid_cache_entries_on_key_hash; Type: INDEX; Schema: public; Owner: - | ||
-- | ||
|
||
CREATE UNIQUE INDEX index_solid_cache_entries_on_key_hash ON public.solid_cache_entries USING btree (key_hash); | ||
|
||
|
||
-- | ||
-- Name: index_solid_cache_entries_on_key_hash_and_byte_size; Type: INDEX; Schema: public; Owner: - | ||
-- | ||
|
||
CREATE INDEX index_solid_cache_entries_on_key_hash_and_byte_size ON public.solid_cache_entries USING btree (key_hash, byte_size); | ||
|
||
|
||
-- | ||
-- PostgreSQL database dump complete | ||
-- | ||
|
||
SET search_path TO "$user", public; | ||
|
||
INSERT INTO "schema_migrations" (version) VALUES | ||
('1'); | ||
|
Oops, something went wrong.