Skip to content

Instantly share code, notes, and snippets.

@asankulov
Created March 24, 2020 07:59
Show Gist options
  • Save asankulov/ce50f5b35373caf86c8f5469545db70f to your computer and use it in GitHub Desktop.
Save asankulov/ce50f5b35373caf86c8f5469545db70f to your computer and use it in GitHub Desktop.
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:
FROM nginx:stable-alpine
COPY nginx.conf /etc/nginx/nginx.conf
CMD ["nginx", "-g", "daemon off;"]
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