Skip to content

Dockerize #138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Feb 15, 2019
Merged

Dockerize #138

merged 9 commits into from
Feb 15, 2019

Conversation

connorshea
Copy link
Owner

@connorshea connorshea commented Feb 15, 2019

This took way too long. I kind of hate Docker.

You can run this with docker-compose up --build.

Notes:

  • Docker on Mac kind of sucks, don't use it for development. Only testing a production environment.
  • Don't use volumes on Mac if you can avoid it. They're slow as hell. Should be fine on Linux tho.
  • There's a lot of conflicting information on Docker and how to use it with Rails. The Docker docs on using Docker Compose with Rails are straight-up bullshit.
  • Still no idea how exactly I should be handling this so the database doesn't get nuked when the Docker container is updated.
  • Ran into this issue with Bundler/Ruby, had to add require 'bundler' in bin/webpack and bin/webpack-dev-server: Bundler 2 is already installed, still getting "You must use Bundler 2 or greater with this lockfile" error rubygems/bundler#6937
  • Ran into this issue with node-sass: Docker ALPINE Linux throws node-sass missing binding error sass/node-sass#2165, fix is described in https://github.com/sass/node-sass/issues/2165#issuecomment-347043659.
  • I decided against using .env files for passing environment variables, since I wanted to commit them to the repository anyway I may as well include the variables in the Dockerfile/docker-compose.yml.
  • Need to be careful not to lead sensitive information into the Docker container when building it, make sure to include any files you don't want to have in the container in .dockerignore.
    • Related: The container shouldn't have anything like logs, cache, storage, etc. when built. If it's not in the git repo it shouldn't be in the docker container.
  • I should maybe move the Docker image to Alpine Linux at some point, right now it's on Debian. But meh, for now it works.
  • I need to figure out a good process for deploying the Docker container to Docker Hub and then using the container in production. Ideally it'd be entirely automated.
  • Opened Figure out how to handle credentials #137 RE: handling credentials, this is especially important for deployment since I'll probably need stuff like AWS API keys or some-such.

@connorshea connorshea merged commit ff53fd0 into master Feb 15, 2019
@connorshea connorshea deleted the dockerize branch February 15, 2019 06:45
@connorshea connorshea mentioned this pull request Feb 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant