-
Notifications
You must be signed in to change notification settings - Fork 3
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
Adds Dockerfiles + fig.yml for local development #1
Closed
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
Re-working Dockerfiles to only concern with backend atm, frontend getting moved to separate repo |
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.
Running the Docker Environment
sudo systemctl start docker
docker
/fig
commands withsudo
by adding yourself to the
docker
group withsudo gpasswd -a <user> docker
and then logging out and back in.boot2docker
Neu-Hatch
to
hatch
or something, Docker doesn't allow capital letters in containernames
docker
group, you'll need to prefix thecommands with
sudo
. Since some of the environment variables in thefig.yml
are sourced from the host thatfig
is running on, you'llneed to use a small helper script that you can use
sudo
with thatwill source your
ENVVAR
file and then runfig up
fig run server python manage.py db init
fig run server python manage.py db migrate
fig run server python manage.py db upgrade
localhost:8000
in yourweb browser. OAuth v1 is believed to be working
Making Changes
Client
If you have the collection of containers running (
db
,server
,client
),and want to test your changes to the client code, you should do the following:
fig stop client
to stop the existingclient
containerfig rm client
to remove the existingclient
containerfig build client
to create a newclient
container with your mostrecent changes.
fig up client
to start theclient
containerBackend (db and server)
If you make changes to the back end code, it's easiest to do the following:
fig stop
or pressCtrl+C
in the terminal window wherefig
isrunning to stop the containers.
fig rm
to remove the old containersfig build
to build new containers with the latest changesfig up
. You will need to re-run the database migrations (migrate
and
upgrade
,init
most likely will not need to be run).TODO
5432
and5000
through containerlinking
the database will live.
Fig installed, cloning this repo, and running
fig up