Spaces:
Running
Running
Added reverse proxy and use 3000:8080/tcp port
Browse files- Dockerfile +15 -0
- README.md +1 -1
Dockerfile
CHANGED
@@ -10,6 +10,9 @@ RUN adduser -D -u 1000 "user"
|
|
10 |
# Switch to the "user" user
|
11 |
USER user
|
12 |
|
|
|
|
|
|
|
13 |
# Set home to the user's home directory
|
14 |
ENV HOME=/home/user \
|
15 |
PATH=/home/user/.local/bin:$PATH
|
@@ -17,8 +20,20 @@ ENV HOME=/home/user \
|
|
17 |
# Set the working directory to the user's home directory
|
18 |
WORKDIR $HOME/app
|
19 |
|
|
|
|
|
|
|
20 |
RUN ls
|
21 |
|
|
|
|
|
|
|
22 |
#CMD ["docker-compose", "-f", "/code/dsa/docker-compose.yml", "up", "-d"]
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
CMD ["nginx", "-g", "daemon off;"]
|
|
|
10 |
# Switch to the "user" user
|
11 |
USER user
|
12 |
|
13 |
+
# Set port as environmental variable for reverse proxy
|
14 |
+
ENV PORT=8080
|
15 |
+
|
16 |
# Set home to the user's home directory
|
17 |
ENV HOME=/home/user \
|
18 |
PATH=/home/user/.local/bin:$PATH
|
|
|
20 |
# Set the working directory to the user's home directory
|
21 |
WORKDIR $HOME/app
|
22 |
|
23 |
+
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
24 |
+
COPY --chown=user . $HOME/app
|
25 |
+
|
26 |
RUN ls
|
27 |
|
28 |
+
# change to nginx user
|
29 |
+
USER nginx
|
30 |
+
|
31 |
#CMD ["docker-compose", "-f", "/code/dsa/docker-compose.yml", "up", "-d"]
|
32 |
|
33 |
+
# ENTRYPOINT ["sh", "/docker-entrypoint.sh"]
|
34 |
+
|
35 |
+
# reverse proxy server
|
36 |
+
EXPOSE 3000
|
37 |
+
EXPOSE 8080
|
38 |
+
|
39 |
CMD ["nginx", "-g", "daemon off;"]
|
README.md
CHANGED
@@ -3,7 +3,7 @@ title: 'dsa4hf: Project to showcase AI solutions for medical applications in OHI
|
|
3 |
colorFrom: indigo
|
4 |
colorTo: indigo
|
5 |
sdk: docker
|
6 |
-
app_port: 8080
|
7 |
emoji: 🔬
|
8 |
pinned: false
|
9 |
license: mit
|
|
|
3 |
colorFrom: indigo
|
4 |
colorTo: indigo
|
5 |
sdk: docker
|
6 |
+
app_port: 3000:8080/tcp
|
7 |
emoji: 🔬
|
8 |
pinned: false
|
9 |
license: mit
|