Created
March 24, 2020 07:59
-
-
Save asankulov/ce50f5b35373caf86c8f5469545db70f to your computer and use it in GitHub Desktop.
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: | |
nuxt_app: | |
container_name: nuxt_app | |
restart: on-failure | |
build: ./nuxt_app | |
depends_on: | |
- mongo | |
command: ["npm", "start"] | |
env_file: | |
- ./nuxt_app/.env | |
volumes: | |
- ./uploads:/usr/src/app/static/uploads | |
networks: | |
- default | |
ports: | |
- "4000:4000" | |
mongo: | |
container_name: mongo | |
restart: on-failure | |
image: mongo:3.6.9-stretch | |
volumes: | |
- /opt/project-db:/data/db | |
networks: | |
- default | |
nginx: | |
container_name: nginx | |
build: ./nginx | |
restart: on-failure | |
depends_on: | |
- nuxt_app | |
ports: | |
- "80:80" | |
- "443:443" | |
networks: | |
- default | |
networks: | |
default: |
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
FROM nginx:stable-alpine | |
COPY nginx.conf /etc/nginx/nginx.conf | |
CMD ["nginx", "-g", "daemon off;"] |
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
FROM node:10.13.0-jessie | |
RUN mkdir -p /usr/src/app | |
WORKDIR /usr/src/app | |
COPY package.json . | |
RUN npm i | |
COPY . . | |
RUN npm run build | |
ENV PORT 4000 | |
ENV HOST 0.0.0.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment