Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Dockerize dev environment #44

Open
ThomWright opened this issue May 12, 2015 · 5 comments
Open

Dockerize dev environment #44

ThomWright opened this issue May 12, 2015 · 5 comments

Comments

@ThomWright
Copy link
Contributor

@williammartin

@williammartin
Copy link

Heads up, this will be a bit of a brain dump....

So what would we actually like here from a user perspective? To be able to run:

docker-compose up

and have two containers spun up, one for the registry server, one for mongodb and have them linked together?

Would we want this to be a kind of testbed where the data is ephemeral and disappears after the containers go away or keep it around even if we remove the containers? What does the Vagrant solution do?

Finally, some people prefer their docker separated from their code. We could have another repository under the jsonresume org or we can put the necessary files in this repo - any preferences?

@ThomWright
Copy link
Contributor Author

Please note: I'm coming from a position of ignorance as far as Docker goes 😛

Running docker-compose up and spinning up/linking the containers sounds good to me.

Personally I think I'm OK with it being an ephemeral test-bed if that's easier, but having it persistent would be cool.

Vagrant saves the state of your VM. Unless you destroy and re-create the VM, the data in Mongo is kept (even if you re-provision, I think).

What are the arguments for/against separating/integrating the docker stuff?

@williammartin
Copy link

I would be very surprised if it is difficult to make the data persistent - mostly depends on how mongo stores its data.

Arguments around separating are basically the usual coupling ones, that you end up having both build and deployment artifacts in the same repo. No big deal either way I think. Probably best to keep things together for now and split out later if necessary?

@PeterDaveHello
Copy link
Member

Hey guys I added Dockerfile in 2ec97fc and published on Docker Hub here, feel free to try and give feedback, thanks a lot!

@PeterDaveHello PeterDaveHello self-assigned this May 5, 2017
@milovanderlinden
Copy link

I managed to simplify the Dockerfile by using node:14 as base image.

From node:14

MAINTAINER Peter Dave Hello <[email protected]>
ENV DEBIAN_FRONTEND noninteractive

COPY . /registry-server
WORKDIR /registry-server

RUN git submodule update --init --recursive --depth 1
RUN npm install --prefix "/registry-server"

EXPOSE 3000 5000

ENTRYPOINT ["npm", "start"]

This works, but I then also discoverd that the connection to the theme server is hardcoded but because the theme server doesn't have CORS enabled, this will fail. I solved it by copying /lib/theme.js from the themeserver repository and adding the corresponding routes to server.js/ This also resulted in errors because the themes are grabbed from the / route by the editor. By updating the routes to use /theme, I now have a working combined registry-server and theme-server. For details, check this commit: codefornl@b20864f

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants