Skip to content

Commit

Permalink
Merge pull request #59 from coweos/feat/container-improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
iam-abbas committed Feb 16, 2021
2 parents d5f51cc + 15877dd commit af82387
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
3 changes: 3 additions & 0 deletions back/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,8 @@ RUN pip install -r requirements.txt
# Clean the workspace
RUN rm requirements.txt

# Copy the sources files into the image
COPY . .

# Command to run on container start
CMD [ "python", "./wsgi.py" ]
16 changes: 5 additions & 11 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
version: '3.4'
version: "3.4"

services:

backend:
image: reddit-stock-backend
build:
context: ./back/
dockerfile: Dockerfile
network: host
ports:
- '5000:5000'
- "5000:5000"
volumes:
- './back:/code'
- "./back:/code"

frontend:
image: reddit-stock-frontend
build:
context: ./front/
dockerfile: Dockerfile
network: host
ports:
- '8080:8080'
- "8080:8080"
volumes:
- './front:/code'
- "./front:/code"
3 changes: 3 additions & 0 deletions front/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@ RUN npm install

WORKDIR /code

# Copy the sources files into the image
COPY . .

# Command to run on container start
CMD [ "sh", "-c", "cp -r /tmp/node_modules /code/node_modules && npm run serve" ]

0 comments on commit af82387

Please sign in to comment.