sweet-sh / sweet-web

A lightweight, trust- and community-based social network
GNU Affero General Public License v3.0
21 stars 2 forks source link

feat(docker): wrote dev and prod Dockerfiles #195

Open hakamadare opened 4 years ago

hakamadare commented 4 years ago
$ docker build \
    -t sweet:dev \
    -f docker/Dockerfile.dev \
    .
$ docker run \
    --rm \
    -it \
    sweet:dev

still to do:

hakamadare commented 4 years ago

hey @lowercasename @wlonk this is still a WIP, i wanna see if i can get the MongoDB portion done and figure out how the app currently consumes MongoDB connection params (looks like they're in a config file now?)

hakamadare commented 4 years ago

the first milestone i'm aiming for is "yarn docker:dev produces a stand-alone dev instance of the service, with no hard external dependencies"

wlonk commented 4 years ago

Using local yarn as a taskrunner for Docker is interesting! A lot of my motivation for using Docker is to avoid having to run yarn locally, since we have to juggle so many versions. But I think what you're describing is reasonable for this use-case!

hakamadare commented 4 years ago

yup, i figure that since any developer will have a Node environment locally, using yarn as the generic taskrunner makes sense.

lowercasename commented 4 years ago

You'd be surprised how many people I know seem militantly opposed to yarn just because it's not npm, mind you. I think yarn here is a good shout.

wlonk commented 4 years ago

@lowercasename I suspect that's just conservatism; in my experience, yarn is "npm but better on literally every metric" 🤷 I may also be neophilic!

wlonk commented 4 years ago

@hakamadare You said this is a WIP; is there anything I can do to help move it forward from that status to a mergeable proposal?