Aardwolf-Social / aardwolf

Powering connected social communities with open software.
GNU Affero General Public License v3.0
480 stars 40 forks source link

Preparing for docker #195

Closed Edelstadt closed 4 years ago

Edelstadt commented 5 years ago

An example of how it could look Docker. Up - docker-compose up -d --force-recreate Start server - docker exec -it aardwolf_app_1 /src/aardwolf/aardwolf-server

Just example ...

BanjoFox commented 5 years ago

Awesome!

I think that having Docker available to folks may help move things along more fluidly :)

BanjoFox commented 5 years ago

I reckon it would make more sense to have --out-dir pointing to /bin (or the like). Thankfully that should be an easy change down the line.

On Sat, May 11, 2019, 12:41 Riley notifications@github.com wrote:

@asonix approved this pull request.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Aardwolf-Social/aardwolf/pull/195#pullrequestreview-236384284, or mute the thread https://github.com/notifications/unsubscribe-auth/ABCA2JFDM6J7U2EBOZATSW3PU3ZKVANCNFSM4HMIKGIQ .

hugglesfox commented 4 years ago

It would be more beneficial to use the multi-stage builds feature of docker to build the binary using the official rust docker image then using an image like alpine for the actual deployment to keep image sizes small as we don't need all the build deps to just run a prebuilt binary.

BanjoFox commented 4 years ago

FYI.... I messed up and closed this PR (Merge > Revert Merge), so I've created a new branch based on the changes

https://github.com/Aardwolf-Social/aardwolf/tree/Edelstadt-docker

BanjoFox commented 4 years ago

Yep!!!

I bet we can do both.

https://doc.rust-lang.org/cargo/reference/environment-variables.html

On Wed, Dec 4, 2019, 22:54 Hayden Hughes notifications@github.com wrote:

@haydenhughes commented on this pull request.

In config/example.toml https://github.com/Aardwolf-Social/aardwolf/pull/195#discussion_r354100560 :

@@ -57,7 +57,7 @@ https = false type = "postgresql"

Database.host - The ip address of the machine hosting the database.

-host = "127.0.0.1" +host = "db"

Is there a way we could have both? So if the environment variable is not set then it defaults to what's in the config file?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Aardwolf-Social/aardwolf/pull/195?email_source=notifications&email_token=ABCA2JEOPX47MTYFL35KGW3QXB3Q5A5CNFSM4HMIKGI2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCOBCIWA#discussion_r354100560, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABCA2JFCV5V33JEZTKCGRL3QXB3Q5ANCNFSM4HMIKGIQ .

hugglesfox commented 4 years ago

Has there been any work done on implementing this yet? If not, I'll take a stab at it.

BanjoFox commented 4 years ago

Please feel free to try :)