Skip to content

Commit 28081bd

Browse files
committed
Changes made,generate working project structure - yet to fix the postgres connection and the REST
1 parent 79322d4 commit 28081bd

File tree

7 files changed

+46
-28
lines changed

7 files changed

+46
-28
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ remove:
88
sudo docker-compose down --remove-orphans
99

1010
build:
11-
sudo docker-compose -f docker-compose.dev.yaml up --build
11+
cd server && dotnet publish -c Release && cd ..
12+
sudo docker-compose -f docker-compose.dev.yml up --build
1213

1314
up:
14-
sudo docker-compose -f docker-compose.dev.yaml up
15+
sudo docker-compose -f docker-compose.dev.yml up
1516

1617
ps:
1718
sudo docker-compose ps -a

client/.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/**/**

client/Dockerfile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@ FROM node
22

33
WORKDIR /App
44

5-
COPY ./package.json /App/
5+
COPY ./package.json ./yarn.lock /App/
66

7-
COPY ./yarn-lock.json /App/
8-
9-
RUN npm install
7+
RUN yarn
108

119
COPY ./ /App/
1210

13-
CMD ["npm","start"]
11+
CMD ["yarn","start"]

docker-compose.dev.yml

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,23 @@ services:
1111
- ./web-server/nginx.conf:/etc/nginx/nginx.conf
1212
ports:
1313
- "8080:8080"
14-
depends_on:
15-
- client
16-
- server
17-
- smtp
18-
- postgres
19-
- mongo
20-
- cache
14+
# depends_on:
15+
# - client
16+
# - server
17+
# - smtp
18+
# - postgres
19+
# - mongo
20+
# - cache
2121

22-
client:
23-
container_name: client
24-
build: ./client
25-
stdin_open: true
26-
restart: always
27-
volumes:
28-
- "./client:/App"
29-
ports:
30-
- "3000:3000"
22+
# client:
23+
# container_name: client
24+
# build: ./client
25+
# stdin_open: true
26+
# restart: always
27+
# volumes:
28+
# - "./client:/App"
29+
# ports:
30+
# - "3000:3000"
3131

3232
server:
3333
container_name: backend
@@ -36,7 +36,8 @@ services:
3636
volumes:
3737
- "./server:/Backend"
3838
ports:
39-
- "5000:5000"
39+
- "5000:5000" # For HTTP
40+
- "5001:5001" # For HTTPS
4041

4142
smtp:
4243
container_name: smtp
@@ -49,7 +50,7 @@ services:
4950
- "1080:1080"
5051

5152
postgres:
52-
name: primary
53+
container_name: primary
5354
image: postgres:latest
5455
environment:
5556
- POSTGRES_USER={POSTGRES_USER}

docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ services:
4545
- SMTP_PORT=${SMTP_PORT}
4646
- HTTP_PORT=${HTTP_PORT}
4747
expose:
48-
- "1025:1025"
49-
- "1080:1080"
48+
- "1025"
49+
- "1080"
5050

5151
postgres:
52-
name: primary
52+
container_name: primary
5353
image: postgres:latest
5454
environment:
5555
- POSTGRES_USER={POSTGRES_USER}

server/.config/dotnet-tools.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"dotnet-ef": {
6+
"version": "5.0.2",
7+
"commands": [
8+
"dotnet-ef"
9+
]
10+
}
11+
}
12+
}

server/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM microsoft/aspnetcore
2+
CMD [ "dotnet", 'publish', '-c', 'Release']
3+
COPY ./bin/Release/net5.0/publish App/
4+
WORKDIR /App
5+
ENTRYPOINT [ "dotnet", "NetCore.Docker.dll" ]

0 commit comments

Comments
 (0)