Skip to content
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

Create Dockerfile #22

Closed
ricardobalk opened this issue Oct 15, 2020 · 1 comment
Closed

Create Dockerfile #22

ricardobalk opened this issue Oct 15, 2020 · 1 comment
Assignees
Labels
improvement Something that currently works, but can be done in a better way
Milestone

Comments

@ricardobalk
Copy link
Collaborator

Now that the project has both a back-end and a front-end interface (#15), it is recommended to create a Dockerfile that can be used to build the web interface (yarn i && yarn run build) and then run the Go back-end (go run main.go), so that the app can be started easily (docker build -t ricardobalk/go-osmand-tracker . && docker run [...] ricardobalk/go-osmand-tracker

@ricardobalk ricardobalk added the improvement Something that currently works, but can be done in a better way label Oct 15, 2020
@ricardobalk ricardobalk added this to the 1.1.0 milestone Oct 15, 2020
@ricardobalk ricardobalk self-assigned this Oct 15, 2020
@ricardobalk
Copy link
Collaborator Author

ricardobalk commented Oct 17, 2020

As can be seen in 247321f, the Dockerfile to build the map interface has been added. Will work on the Dockerfile for the API back-end soon. Might need something like docker-compose to combine the two and let them execute in the right order, because when want to use both the (Go-based) API back-end and the (Vue based) map interface, you'd need to build the map interface first and then run the back-end API.

How that works? Well, yarn run build usually builds the map interface and places the result in web/dist, and if web/dist exists, the Go server will serve that directory when visiting /. 🎉 added that in c8f0ac7

Anyways — the most practical thing would be to have a docker compose -d up or something similar that takes care of it. 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Something that currently works, but can be done in a better way
Projects
None yet
Development

No branches or pull requests

1 participant