File tree 4 files changed +60
-0
lines changed
4 files changed +60
-0
lines changed Original file line number Diff line number Diff line change
1
+ node_modules
2
+
3
+ npm-debug.log
4
+
5
+ Dockerfile
6
+
7
+ .dockerignore
8
+
9
+ .env
10
+
Original file line number Diff line number Diff line change 128
128
.yarn /build-state.yml
129
129
.yarn /install-state.gz
130
130
.pnp. *
131
+
132
+ # idea
133
+
134
+ . /.idea
Original file line number Diff line number Diff line change
1
+ FROM node:18
2
+
3
+ WORKDIR /usr/src/app
4
+
5
+ COPY package.json package-lock.json ./
6
+
7
+ RUN npm install
8
+
9
+ COPY . .
10
+
11
+ EXPOSE 3000
12
+
13
+ CMD ["node" , "src/server.js" ]
Original file line number Diff line number Diff line change
1
+ version : " 3.8"
2
+
3
+ services :
4
+ afos-api :
5
+ build :
6
+ context : .
7
+ dockerfile : Dockerfile
8
+ ports :
9
+ - 3000:3000
10
+ volumes :
11
+ - .:/src
12
+ environment :
13
+ - NODE_ENV=production
14
+ - PORT=3000
15
+ - DB_HOST=mysql
16
+ - DB_USER=afos
17
+ - DB_PASSWORD=afosS3cure!Passw@rd
18
+ - DB_NAME=afosdb
19
+ - JWT_SECRET=afos-secret
20
+ depends_on :
21
+ - mysql
22
+
23
+ mysql :
24
+ image : mysql:8.0
25
+ container_name : mysql-container
26
+ environment :
27
+ MYSQL_ROOT_PASSWORD : passw@rd
28
+ MYSQL_DATABASE : afosdb
29
+ volumes :
30
+ - mysql_data:/var/lib/mysql
31
+
32
+ volumes :
33
+ mysql_data :
You can’t perform that action at this time.
0 commit comments