Skip to content
Snippets Groups Projects
Commit 5ed6b536 authored by Matt Kirby's avatar Matt Kirby
Browse files

I read a tutorial :)

parent 002c7bcc
No related branches found
No related tags found
1 merge request!24Fe questions and posts (This one is big)
FROM node:latest as base # base image
FROM node:alpine
# Create app directory # create & set working directory
RUN mkdir -p /frontend-service/app
WORKDIR /frontend-service/app WORKDIR /frontend-service/app
COPY package*.json ./ # copy source files
RUN npm install COPY . /frontend-service/app
# Bundle app source
COPY . .
# start app
RUN npm run build
EXPOSE 9000 EXPOSE 9000
CMD npm run dev
CMD [ "npm", "run", "dev" ] \ No newline at end of file
\ No newline at end of file
...@@ -34,13 +34,17 @@ services: ...@@ -34,13 +34,17 @@ services:
- MONGO_PORT=27017 - MONGO_PORT=27017
- MONGO_DBNAME=friends - MONGO_DBNAME=friends
# frontend-service: frontend-service:
# build: build:
# context: './daily-thought-frontend' context: "./daily-thought-frontend"
# dockerfile: Dockerfile dockerfile: Dockerfile
# restart: unless-stopped restart: unless-stopped
# ports: ports:
# - "8000:9000" - "8000:9000"
volumes:
- ./daily-thought-frontend:/frontend-service/app
- /frontend-service/app/node_modules
- /frontend-service/app/.next
feed-mongo: feed-mongo:
image: mongo image: mongo
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment