-
Notifications
You must be signed in to change notification settings - Fork 14
Dockerize #211
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
Open
useffc
wants to merge
20
commits into
master
Choose a base branch
from
dockerize
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Dockerize #211
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
4885ab1
initial work on Dockerizing forum app
useffc dee8b43
seems to be working now. apparently the `command` part of docker-compose
useffc 5384d52
Add Dockerfile for postgres; seems to allow tables.sql to be correctly
useffc 2df7913
clean up comments
useffc 491daf0
try to get travis to run tests
useffc 46b88d6
make test db (with own dockerfile) and test service. point urls to test
useffc f60a315
map local volumes to container volumes so changes will come through to
useffc de30588
update docs a bit to mirror how this is currently working
useffc 476008d
update test service name from e2e
useffc 8442772
hot reloading works with docker
useffc c53f5bd
update docs on hot reloading
useffc 0db8d40
use node 8 in docker, kill unused node8-incompatible dependency
nchase 04254a4
use nodemon to run dev server, expose all at /code in container
nchase 03a41fe
add dockerignore to keep node_modules from being copied to container
nchase b97e6f9
update signup token
nchase 00f7be4
kill dumb redirect code
nchase 5251b20
Merge branch 'dockerize-plus-server-reload' into dockerize
nchase d9567f9
noodling with dark theme
useffc b130abc
move style choice outside of react to avoid flash of mis-styled content
nchase 372bcbe
add a couple of additional dark styles (loading, a couple of text are…
nchase File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 @@ | ||
node_modules |
This file contains hidden or 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 |
---|---|---|
@@ -1 +1 @@ | ||
v6.3.1 | ||
v8 |
This file contains hidden or 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 |
---|---|---|
@@ -1,15 +1,9 @@ | ||
language: node_js | ||
node_js: | ||
- "6" | ||
env: | ||
- CXX=g++-4.8 | ||
addons: | ||
postgresql: "9.3" | ||
apt: | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
packages: | ||
- g++-4.8 | ||
before_script: | ||
- psql -c 'create database forum;' -U postgres | ||
- psql -c 'create database forum_test;' -U postgres | ||
- "8" | ||
services: | ||
- docker | ||
before_install: | ||
docker-compose build | ||
script: | ||
docker-compose run test |
This file contains hidden or 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,7 @@ | ||
FROM node:8 | ||
RUN mkdir /code | ||
ADD . /code | ||
RUN mkdir /code/build | ||
WORKDIR /code | ||
RUN npm install | ||
EXPOSE 80 |
This file contains hidden or 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,10 @@ | ||
FROM postgres:9.5 | ||
|
||
ENV POSTGRES_DB forum | ||
ENV POSTGRES_USER forum | ||
|
||
# Init db | ||
RUN mkdir -p /docker-entrypoint-initdb.d | ||
COPY tables.sql /docker-entrypoint-initdb.d/ | ||
|
||
RUN /etc/init.d/postgresql start |
This file contains hidden or 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,10 @@ | ||
FROM postgres:9.5 | ||
|
||
ENV POSTGRES_DB forum_test | ||
ENV POSTGRES_USER postgres | ||
|
||
# Init db | ||
RUN mkdir -p /docker-entrypoint-initdb.d | ||
COPY tables.sql /docker-entrypoint-initdb.d/ | ||
|
||
RUN /etc/init.d/postgresql start |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,38 @@ | ||
version: "2" | ||
services: | ||
web: | ||
build: . | ||
ports: | ||
- 80:3000 | ||
- 4474:4474 | ||
command: bash -c 'while !</dev/tcp/db/5432; do sleep 1; done; npm run start:dev' | ||
depends_on: | ||
- db | ||
environment: | ||
- DATABASE_URL=postgres://forum@db:5432/forum | ||
- PORT=3000 | ||
- FORUM_STORAGE_ADAPTER=S3 | ||
volumes: | ||
- .:/code | ||
- /code/build | ||
- /code/node_modules | ||
- ./stylesheets:/code/stylesheets:rw | ||
db: | ||
build: | ||
context: . | ||
dockerfile: ./Dockerfile.postgres | ||
# Testing | ||
test: | ||
build: . | ||
ports: | ||
- 80:3099 | ||
command: bash -c 'while !</dev/tcp/test_db/5432; do sleep 1; done; npm run test' | ||
depends_on: | ||
- test_db | ||
environment: | ||
- DATABASE_URL=postgres://postgres@test_db:5432/forum_test | ||
- PORT=3099 | ||
test_db: | ||
build: | ||
context: . | ||
dockerfile: ./Dockerfile.test.postgres |
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.