-
Notifications
You must be signed in to change notification settings - Fork 809
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docker: Update project setup using docker (#1646)
- Loading branch information
Showing
6 changed files
with
50 additions
and
84 deletions.
There are no files selected for viewing
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,53 @@ | ||
version: "2" | ||
services: | ||
|
||
db: | ||
image: postgres | ||
ports: | ||
- "5432:5432" | ||
|
||
rabbitmq: | ||
image: rabbitmq | ||
hostname: rabbitmq | ||
ports: | ||
- "5672:5672" | ||
- "15672:15672" # here, we can access rabbitmq management plugin | ||
|
||
django: | ||
container_name: django | ||
hostname: django | ||
build: | ||
env_file: | ||
- docker/dev.env | ||
build: | ||
context: ./ | ||
dockerfile: docker/prod/django/Dockerfile | ||
command: /code/docker/prod/django/container-start.sh | ||
dockerfile: docker/dev/django/Dockerfile | ||
ports: | ||
- "8000:8000" | ||
volumes: | ||
- .:/code | ||
node-nginx: | ||
container_name: node-nginx | ||
hostname: node-nginx | ||
- "8000:8000" | ||
command: ["./docker/wait-for-it.sh", "db:5432", "--", "sh", "/code/docker/dev/django/container-start.sh"] | ||
depends_on: | ||
- "db" | ||
|
||
submission-worker: | ||
env_file: | ||
- docker/dev.env | ||
build: | ||
context: ./ | ||
dockerfile: docker/prod/node-nginx/Dockerfile | ||
command: /code/docker/prod/node-nginx/container-start.sh | ||
dockerfile: docker/dev/rabbitmq/Dockerfile | ||
command: ["./docker/wait-for-it.sh", "django:8000", "--", "python", "scripts/workers/submission_worker.py"] | ||
depends_on: | ||
- "django" | ||
|
||
nodejs: | ||
container_name: nodejs | ||
hostname: nodejs | ||
build: | ||
context: ./ | ||
dockerfile: docker/dev/nodejs/Dockerfile | ||
environment: | ||
NODE_ENV: production | ||
NODE_ENV: development | ||
ports: | ||
- "80:80" | ||
- "8080:8080" | ||
depends_on: | ||
- django | ||
- '8888:8888' | ||
volumes: | ||
- .:/code | ||
- /code/node_modules | ||
- /code/bower_components |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,12 @@ | ||
FROM ubuntu:14.04 | ||
MAINTAINER CloudCV | ||
FROM node:8.11.1 | ||
MAINTAINER EvalAI Team <[email protected]> | ||
|
||
RUN apt-get update -qq && apt-get install -y build-essential git curl libfontconfig | ||
RUN apt-get install nodejs-legacy -y | ||
RUN apt-get install npm -y | ||
RUN apt-get install -y ruby-dev | ||
RUN gem install sass -v 3.2.19 | ||
RUN apt-get update | ||
|
||
RUN mkdir /code | ||
|
||
# Add dependencies | ||
ADD ./frontend /code/frontend | ||
ADD ./package.json /code | ||
ADD ./bower.json /code | ||
ADD ./gulpfile.js /code | ||
|
@@ -19,12 +15,8 @@ ADD ./karma.conf.js /code | |
|
||
WORKDIR /code | ||
|
||
# Bypass the ssl check | ||
RUN npm config set strict-ssl false | ||
|
||
# Install Prerequisites | ||
RUN npm install bower -g | ||
RUN npm install gulp -g | ||
RUN npm install -g bower gulp | ||
|
||
RUN npm link gulp | ||
|
||
|
@@ -34,7 +26,8 @@ RUN n stable | |
RUN npm install | ||
RUN bower install --allow-root | ||
|
||
# Set the command to run on startup | ||
ADD . /code | ||
|
||
CMD ["gulp", "dev:runserver"] | ||
|
||
EXPOSE 8888 |
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