Finished Frontend only for eg3
parent
72a0a57842
commit
43a2dfefc7
|
@ -5,7 +5,13 @@
|
||||||
## Backend only
|
## Backend only
|
||||||
|
|
||||||
How to test it:
|
How to test it:
|
||||||
|
|
||||||
1. Comment all other containers
|
1. Comment all other containers
|
||||||
2. Run `docker compose build` & `docker compose up`
|
2. Run `docker compose build` & `docker compose up`
|
||||||
3. Test by `curl localhost:5000`, should return `{"version":"1.0.0"}`
|
3. Test by `curl localhost:5000`, should return `{"version":"1.0.0"}`
|
||||||
|
|
||||||
|
## Frontend only
|
||||||
|
|
||||||
|
How to test it:
|
||||||
|
1. Comment all other containers
|
||||||
|
2. Run `docker compose build` & `docker compose up`
|
||||||
|
3. Test by `curl localhost`, should return a html file (as `/eg3/frontend/index.html`)
|
|
@ -12,16 +12,18 @@ services:
|
||||||
# - frontend
|
# - frontend
|
||||||
# - backend
|
# - backend
|
||||||
|
|
||||||
# frontend:
|
frontend:
|
||||||
# container_name: frontend
|
container_name: frontend
|
||||||
# build:
|
|
||||||
# context: ./frontend
|
|
||||||
# dockerfile: Dockerfile
|
|
||||||
|
|
||||||
backend:
|
|
||||||
container_name: backend
|
|
||||||
build:
|
build:
|
||||||
context: ./backend
|
context: ./frontend
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
ports:
|
ports:
|
||||||
- "5000:5000" # Uncomment this line if you want to run the backend container only
|
- "80:80" # Uncomment this line if you want to run the frontend container only
|
||||||
|
|
||||||
|
# backend:
|
||||||
|
# container_name: backend
|
||||||
|
# build:
|
||||||
|
# context: ./backend
|
||||||
|
# dockerfile: Dockerfile
|
||||||
|
# ports:
|
||||||
|
# - "5000:5000" # Uncomment this line if you want to run the backend container only
|
|
@ -1,4 +1,3 @@
|
||||||
FROM nginx:stable-alpine
|
FROM nginx:stable-alpine
|
||||||
WORKDIR /usr/share/nginx/html
|
WORKDIR /usr/share/nginx/html
|
||||||
RUN apk add curl
|
|
||||||
COPY index.html .
|
COPY index.html .
|
Loading…
Reference in New Issue