Last active
February 22, 2019 11:52
-
-
Save tanmaiaccion/bfe31cbf6751ae9ee46fae6c103b256c to your computer and use it in GitHub Desktop.
docker-compose example
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
version: "3" | |
services: | |
ganttui: | |
container_name: ganttui | |
labels: | |
app: ganttui | |
ports: | |
- "3000:3000" | |
build: | |
context: ./agilegantt-ui | |
dockerfile: Dockerfile | |
volumes: | |
- ./agilegantt-ui:/usr/src/app | |
- /usr/src/app/node_modules | |
healthcheck: | |
test: ["CMD", "curl", "-f", "http://localhost:3000"] | |
interval: 30s | |
timeout: 10s | |
retries: 3 | |
links: | |
- ganttbackend | |
depends_on: | |
- ganttbackend | |
ganttbackend: | |
container_name: ganttbackend | |
labels: | |
app: ganttbackend | |
ports: | |
- "5000:5000" | |
build: | |
context: ./agilegantt | |
dockerfile: Dockerfile | |
volumes: | |
- ./agilegantt:/usr/src/app | |
- /usr/src/app/node_modules | |
- ./agilegantt/logs/:/usr/src/app/logs | |
- /temp:/usr/src/uploads | |
healthcheck: | |
test: ["CMD", "curl", "-f", "http://localhost:5000"] | |
interval: 30s | |
timeout: 10s | |
retries: 3 |
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
//for nodejs | |
FROM node:carbon-alpine | |
WORKDIR /usr/src/app | |
COPY . . | |
RUN apk -U upgrade && npm install && npm install -g nodemon && rm -rf /var/cache/apk/* | |
EXPOSE 5000 | |
CMD ["npm", "run", "start:dev"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment