Commit graph

76 commits

Author SHA1 Message Date
Andy Zhao
955bdcb2bc
Update docs with Forem instead of dev.to (#9316)
* Rename all GitHub links from thepracticaldev/dev.to to forem/forem

* Use new site name

* Rename to Forem

* Rename more dev.to to forem

* Remove unnecessary redirects

* Rename DEV to Forem

* Use Forem instead of DEV for branding

* Use Forem instead of DEV for licensing

* Use seedling instead of DEV logo
2020-07-15 13:29:11 -04:00
Molly Struve
fde4d3f189
Update Docs, Travis, and Containers to Use Postgres 11 (#9232)
* Update Docs and Containers to Use Postgres 11<, Bump Travis to 10

* Update installation docs as well

Co-authored-by: rhymes <rhymes@hey.com>
2020-07-13 15:09:26 +02:00
Yash Dave
26e3bb96ab
fix node install windows docs (#9070)
* fix node install windows docs
- add nvm installation
- switch yarn to install without node
- add `nvm install` post clone

* improve sentence formation for nvm installation

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

* Remove "Node.js" out of codeblocks

* improve language clarity

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
2020-07-02 15:46:36 -05:00
Jacob Herrington
0c08a63622
Standardize capitalization of JavaScript (#9080)
* Standardize capitalization of JavaScript

* Reword links to alternate JS guides
2020-07-02 15:44:38 -05:00
Yash Dave
9b1b02b996
[deploy] fix blockquote render error windows docs (#9053) 2020-07-01 12:04:37 -04:00
Yash Dave
83bc91b961
Fix rbenv install failing for windows docs (#8854) 2020-06-29 15:27:58 -04:00
Molly Struve
8b8ee0a00e
Documentation: Vault Docs (#8936)
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2020-06-29 09:33:52 -05:00
Joe Doss
aa49cb1cfe
Bugfix for #7663 and refactor of container setup (#7747)
* Move from Alpine Linux to Fedora Linux.

This changes the base container image away from Alpine Linux to
Fedora Linux to address some musl libc issues with some of our gems.

It also moved the main file to a Containerfile and symlinks the Dockerfile
to it. This makes our container setup less Docker-centric as Linux users
most likely will be using Podman as their container runtime.

Lastly, it moves the WORKDIR from /usr/src/app to /opt/apps/devto.
The Linux FHS states that /opt is the spot for Optional application
software packages and /usr/src is for kernel source code.

https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard

/opt Optional application software packages
/usr/src Source code, e.g., the kernel source code with its header files.

Also, if SELinux becomes a thing in our future, moving this makes it
easier to manage contexts out of /opt rather than /usr/src.

* Adjust the Containerfile a bit to add some missing packages, make it
more generic and move env vars to the docker-compose.

* Move the Dockerfile to a symlink to the Containerfile.

We need to be able to support more than just Docker for a container
runtime. Moving everything to a Containerfile and symlinking the
Dockerfile helps users run runtimes such as Podman.

* Add in new entrypoint files and fix the app path in docker-entrypoint.sh

* Refactor the docker-compose.yml file so it doesn't build the main
application container three times in a row. We can use the same
container for web, webpacker, and sidekiq.

Also make the volume names very explicit on what their contents and add
in SELinux context support with :Z

* Fix ELASTICSEARCH_URL.

* Remove the absolute path on ip binary and add in iproute to Containerfile.

* Symlink the Dockerfile to Containerfile and add in a container-compose.yml file
for usage with podman-compose. We are waiting for this issue to get resolved

https://github.com/containers/libpod/issues/6153

and for podman-compose to mature a bit more. A user using podman-compose can use

podman-compose -f container-compose.yml

to launch the DEV container stack with Podman.

* Update the .gitignore file to reflect the new container volumes.

* Fix the entrypoint script on the Containerfile and clean up a bunch of things.

* Rework the Containerfile to prep it to run as a non-root user. We have to wait
for this issue to get fixed:

https://github.com/containers/libpod/issues/6153

for Linux users and then we can uncomment the USER line so we are running Rails
as a non-root user. :toot:

* This reworks the compose files so each task that is needed to start the app has
a correct wait command with dockerize. It also adds in containers for doing
yarn and bundle things for development. Since we mount the code directory inside
the container we lose our pre-containerized gems and node_modules.

This means users can run:

Linux
podman-compose -f container-compose.yml up

Mac
docker-compose up

and it should correctly build the app stack with containers!

* Clean up old container related things.

* Add in some container pre-reqs and my name to the "Core team" section! :toot:

* Adjust the seed and sidekiq compose entries so they do not use the web entrypoint
and set the REDIS_URL and REDIS_SESSIONS_URL env vars for seed.

Add in some echos to the entrypoint.sh.

Also set docker-compose to use :delegated on mount points to speed things up.

https://docs.docker.com/storage/bind-mounts/#configure-mount-consistency-for-macos

* Just call yarn install --dev on the yarn container.

* Update documentation to support Docker and Podman as Container Engines and
move the page from docker to containers to reflect the fact not all users run
their containers via Docker.

There are dozens of us... DOZENS!

* Set --local on bundle config so it just impacts this Ruby app.

* Renamed bin/docker-setup to bin/container-setup to reflect the fact that that
we can use Podman as a container engine. I also refactored it so it does some
basic pre-flight checks for docker and docker-compose or podman and
podman-compose to make sure users have a container engine installed.

* Set cache_all_platforms true for bundler.

* Bump docker-compose dockerize -timeout to 45min for slower macOS hardware.

* Move to the consolidated app_initializer:setup rake task for bootstrapping the
app.

* Update docs/installation/readme.md
2020-05-28 12:11:51 -05:00
Molly Struve
182faa0289
[deploy] Consolidate Setup Tasks to a Single Rake Task (#8065) 2020-05-27 11:59:07 -05:00
Dmitry Maksyoma
44d48a5585
Adapt dev env to use remote box (#7742) 2020-05-13 10:21:00 -04:00
rhymes
e6f9841bca
Update Windows 10 installation docs (#7647) 2020-05-01 13:49:44 -04:00
Mac Siri
b7a29c7144
Make DATABASE_URL_TEST optional (#7604)
* Make DATABASE_URL_TEST optional

* Add documentation

* Update wording
2020-04-30 11:19:16 +02:00
Mac Siri
2ea320a245
Support docker-selenium (#7583)
* Support use of selenium-docker

* Apply suggestion

* Add documentation
2020-04-30 11:07:45 +02:00
Molly Struve
4c779be2ed
[deploy] Remove ALL Algolia Code (#7577) 2020-04-29 10:11:57 -05:00
rhymes
5c17e5c25d
Upgrade Ruby to 2.7.1 (#7097) [deploy]
* Upgrade Ruby to 2.7.1

* Use explicit version in Dockerfile

* Fix docs Gemfile
2020-04-06 18:21:50 +02:00
rhymes
6bede2a92b
Upgrade to Ruby 2.7.0 (#5281) [deploy]
* Upgrade to Ruby 2.7.0

* Upgrade Travis's Ruby as well

* Fix conflict

* Silence all Ruby 2.7 deprecation warnings in dev mode

* Silence dev and test unless CI
2020-04-03 17:36:19 +02:00
briwa
604e76dd88
refactor(docker-setup): use bash instead of ruby (#6935)
* refactor(docker-setup): use bash instead of ruby

* refactor: use a proper header

* refactor: bash -> sh
2020-03-30 10:13:52 +02:00
briwa
09f0773c18
refactor(docker): move redis env config to docker (#6936)
instead of in config/application.yml
2020-03-30 10:48:38 +07:00
Michael Kohl
9b12080478
A docker_setup script (#6827) 2020-03-27 18:48:32 -04:00
Michael Kohl
8b5e66ca0e
Docker fixes (#6803)
* Try out parallel Travis builds

* Add more Bundler options

* Appease the spec gods

I don't think we actually need Timecop.freeze in this spec

* Try inlining factories

* Make sure the time has actually changed

* Add CodeClimate coverage for parallel build

* Explicitly list jobs, don't rely on matrix expansion

* Merge master and move storybook to after_script

* Add missing environment variable

* Remove old cc-test-reporter config

* Move yarn build-storybook back to script, remove conditional coverage upload

* Update yarn constraint and Docker docs

Co-authored-by: rhymes <rhymesete@gmail.com>
2020-03-24 13:15:04 -04:00
Mac Siri
5a9cf514d1
Remove redundant yarn step for Docker (#6572) 2020-03-11 11:56:31 -04:00
Vaidehi Joshi
273dbff099
Add explicit note about cding into Elasticsearch before starting (#6503) [deploy] 2020-03-06 10:34:46 -08:00
rhymes
6f3a8bb407
Bump min version of PostgreSQL (#6443) 2020-03-04 16:40:49 +01:00
rhymes
d95d78671f
Update ES docs for min/max versions and macOS brew (#6441)
* Update ES docs for min/max versions and macOS brew

* Clarify why we need to install the non default version
2020-03-04 14:28:12 +01:00
rhymes
7b6417ca78
Add documentation for how to install ES from homebrew on macOS (#6387)
* Add documentation for how to install ES from brew

* A bit clearer

* Update docs/installation/mac.md

Co-Authored-By: Ridhwana <Ridhwana.Khan16@gmail.com>

* Update docs/installation/mac.md

Co-Authored-By: Ridhwana <Ridhwana.Khan16@gmail.com>

* Move testing section after installation

* Update docs/installation/mac.md

Co-Authored-By: Vaidehi Joshi <vaidehi.sj@gmail.com>

* Update docs/installation/mac.md

Co-Authored-By: Vaidehi Joshi <vaidehi.sj@gmail.com>

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2020-03-02 15:33:33 +01:00
rhymes
cf11268949
Add logging to data scripts runner (#6201) 2020-02-25 13:41:43 -05:00
rhymes
3e8e7fb093
Add troubleshooting section to docs and restore hidden sections (#6231) 2020-02-24 13:37:52 -05:00
Ryan Smith
e4115e5781
Fix markdown and missing command in rails data_updates:run (#6135) 2020-02-18 08:23:00 -06:00
rhymes
f14b5f93fe
Update README and contributing guide (#6074)
* Update readme

* Update contributing guide

* Update prepare PR guides to mention draft PRs
2020-02-17 11:53:49 -05:00
Michael Kohl
1458b42d18
Add rails data_updates:run to Docker documentation (#6097) 2020-02-17 08:19:40 -05:00
Vaidehi Joshi
8a11872472
Add more information about using Elasticsearch to docs (#6046)
It was unclear to me that I explicitly needed Elasticsearch in order for certain tests to run locally. We should specify that in the docs. Also added a note about installing `wget`, which is required to install Elasticsearch in our docs.
2020-02-12 13:23:10 -08:00
Michael Kohl
9ea9549e28
Fix spelling of Elastiscsearch in docs (#6033) 2020-02-12 09:28:28 -05:00
Michael Kohl
38e980917d
Add Elasticsearch to Docker Compose (#5978)
* Copy .ruby-version into Dockerfile
* Add Elasticsearch to Docker Compose
2020-02-11 11:45:16 -05:00
Julianna Tetreault
c9d4dde19c
Adjust cloning example to use SSH rather than HTTPS (#5802)
* Adjust cloning example to use SSH rather than HTTPS

* Add SSH example alongside HTTPS example when cloning DEV repo
2020-02-06 12:53:12 -05:00
Michael Kohl
424c141539
Remove Foreman gem (#5821) 2020-02-05 17:01:04 -05:00
Molly Struve
ccd9bc2553
add missing sha512 to ES mac docs (#5863) 2020-02-03 10:51:08 -05:00
Molly Struve
0409722899
Introduce Elasticsearch to DEV env (#5762) [deploy] 2020-02-03 09:12:05 -05:00
Nick Taylor
c91080c371 Removed redundant yarn install command. (#5764) 2020-01-27 12:10:14 -06:00
Vaidehi Joshi
8dd83298d1 Add documentation around our use of pg-bouncer [ci-skip] (#5710) 2020-01-24 16:02:05 -05:00
Mohamed ABDELLANI
0039e67467 Add redis container to docker-compose (#4965)
* Add redis container to docker-compose [fix issue 4962]

* Updates docker.md
2019-11-29 17:06:56 -05:00
Jacob Herrington
7d0aeeefe5 Improve the clarity of the docs and fix Prettier config (#4899)
* Improve format and clarity of the docs [ci skip]

While this change produces a lot of git noise by enacting what seems
like an arbitrary linewrap on most of the files in the documentation it
will result in better version control and tracking of the changes in the
documentation.

For example, as it currently stands, if one was to make a
PR to move a comma in a sentence because each paragraph in most of the
files is on a single line, that small change would look in the git
history like the author had modified the entire paragraph. In reality,
this author just moved a comma.

This change also includes a significant number of modifications to the
more article-esque docs. Many of these docs were written in a sort of
stream-of-conciousness and aren't as easy to read as they could be.
Hopefully this is the first of several readability changes. If we could
get these docs to a more accessible reading level, we would probably see
an increase in contributions. :)

* Delegate markdown wrapping to Prettier

* Add linewrapping explanation in the docs [ci skip]
2019-11-26 08:40:53 -05:00
Molly Struve
69e35dc1b3 Add Redis gem and Create RedisClient (#4582)
* Add redis gem and client

* use keyword arguments in redis initializer

* check for REDISCLOUD_URL and fallback on REDIS_URL when connecting to redis

* dont parse Redis url in initializer
2019-10-30 10:32:59 -04:00
Nick Taylor
22991239bf Ran all markdown files through prettier to fix a handful. (#4599) 2019-10-28 08:20:53 -04:00
rhymes
8989a52aba Strip EXIF and GPS data from uploaded images (#4450)
* Add specs for ArticleImageUploader

* Add specs for BadgeUploader

* Add specs for CoverImageUploader

* Add specs for ProfileImageUploader

* Refactor uploaders to inherit from BaseUploader

* Strip EXIF and GPS data from uploaded images

* Add ImageMagick to the docs

* Protect strip_exif
2019-10-24 16:35:10 -04:00
Jenna Pederson
ee91310f3a Doc: Fix/clarify getting started docs (#4509) [ci skip] 2019-10-22 14:38:41 -04:00
Abenet Tamiru
ff45dc5e6e Mention POSTGRES_VERSION variable in documentation (#4481) [ci skip] 2019-10-18 10:31:52 -04:00
Ryan Palo
6cbad11b8f [DOC] Update "Installing on Linux" docs with more error messages (#4468) [ci skip] 2019-10-17 11:24:13 -04:00
rhymes
89476fae08 Upgrade Ruby to 2.6.5 (#4451) 2019-10-17 09:34:31 -04:00
Zev Averbach
999042b9b8 add two possible problems + solutions (#4371)
I ran into those today while trying to get everything set up locally. Hopefully this will help future contributors!
2019-10-14 08:43:30 -04:00
Joshua Tzucker
b61db22dc5 [DOC] Update PostgreSQL docs (#4345) [ci skip] 2019-10-10 10:28:17 -04:00