-
Notifications
You must be signed in to change notification settings - Fork 4
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
Dockerizen App #8
Merged
Conversation
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
for dev env, customize docker-compose for prod and dev, customize dockerfiles for prod and dev
utils, refactor where http listener resides => Platform.Start()
add comments for things todo
for individual data types, write convenient shell script for running server and client tests within their docker containers while dev env is running.
refactored model slightly (moved away from a list of poets in user and rather chose to have poets have writers (or gods lol)), setup script for creating a test db by extending the postgres Docker image. All this needs to be cleaned up and the tests will not work in travis yet.
have an organized way of sharing global datastructures, setting up, tearing down suites/tests. update dev server docker image to install connorwalsh/gotest to print colorful test output, update env/config to contain a test config. This is somewhat hacky since it is essentially duplicating code, but it works for now.
for small postgres Dockerfile extension
tests are run in a more similar environment to prod
environment in travis :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Overview
Dev Environment vs. Prod Architecture
dev env
prod env
high level changes
server/types
(same scaffolding can be used in all packagesgetting up and running
to start the dev environment and begin contributing, all you need is
docker
anddocker-compose
installed and then, in the project root, runspin up/teardown dev env
spin up/teardown prod env
Major Changes
Dockerish Stuff
Dockerfile
at top-levelDockerfiles
withinserver
,client
, anddb
(forDEV_ENV
)server/Dockerfile
fresh
, a golang fs-watcher, to stop, recompile, and restart server process whenever changes are made to codebaseclient/Dockerfile
db/Dockerfile
docker-entrypoint-initdb.d/
to create a test database if we are running in the dev envdocker-compose.yml
s for prod and devdocker-compose.yml
(DEV_ENV
compose config)server
,client
, anddb
withDEV_ENV=true
docker-compose.prod.yml
(PROD
compose config)DEV_ENV=false
(actually, it is not set rn, but is effectively false).env
file for specifying environment variables to be set within docker containers.travis.yml
s.t. it spins up theDEV_ENV
within travis and runs tests withintest.sh
script for executing tests within running dev containersApp Related Stuff
there was a bit of scope bleed with this PR, mostly to verify that the db was up and running and behaving well with other containers and during tests
server/core
->server/env
packageUser
modeltypes
package including db setup/teardownUser.CreateTable(...)
Remaining TODOs
test.sh
to spin up two tmux windows for watching the codebases and re-running tests every time something changesthis PR resolves #7