EXPOSE 8680 8633
-ADD /config/application.yaml /opt/app/r-app-catalogue/config/application.yaml
-ADD /config/r-app-catalogue-keystore.jks /opt/app/r-app-catalogue/etc/cert/keystore.jks
-ADD target/${JAR} /opt/app/r-app-catalogue/r-app-catalogue.jar
-
-
-RUN chmod -R 644 /opt/app/r-app-catalogue/config/
-
RUN groupadd -g 999 appuser && \
useradd -r -u 999 -g appuser appuser
RUN chown -R appuser:appuser /opt/app/r-app-catalogue/
RUN chown -R appuser:appuser /var/log/r-app-catalogue/
USER appuser
+ADD /config/application.yaml /opt/app/r-app-catalogue/config/application.yaml
+ADD /config/r-app-catalogue-keystore.jks /opt/app/r-app-catalogue/etc/cert/keystore.jks
+ADD target/${JAR} /opt/app/r-app-catalogue/r-app-catalogue.jar
+
CMD ["java", "-jar", "/opt/app/r-app-catalogue/r-app-catalogue.jar"]
RUN groupadd -g 999 appuser && \
useradd -r -u 999 -g appuser appuser
+
+## add permissions for appuser user
+RUN chown -R appuser:appuser /usr/src/app/ && chmod -R 755 /usr/src/app/ && \
+ chown -R appuser:appuser /var/log/nginx && \
+ chown -R appuser:appuser /var/lib/nginx && \
+ chown -R appuser:appuser /etc/nginx/conf.d
+RUN touch /var/run/nginx.pid && \
+ chown -R appuser:appuser /var/run/nginx.pid
+
USER appuser
CMD [ "./start.sh" ]
-user www-data;
+# user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
WORKDIR /usr/src/app
COPY http_proxy.js .
-RUN groupadd -g 999 appuser && \
- useradd -r -u 999 -g appuser appuser
-USER appuser
+USER node
CMD [ "node", "http_proxy.js" ]
\ No newline at end of file
RUN groupadd -g 999 appuser && \
useradd -r -u 999 -g appuser appuser
+## add permissions for appuser user
+RUN chown -R appuser:appuser /usr/src/app/ && chmod -R 755 /usr/src/app/ && \
+ chown -R appuser:appuser /var/log/nginx && \
+ chown -R appuser:appuser /var/lib/nginx && \
+ chown -R appuser:appuser /etc/nginx/conf.d
+RUN touch /var/run/nginx.pid && \
+ chown -R appuser:appuser /var/run/nginx.pid
+
USER appuser
CMD [ "./start.sh" ]
\ No newline at end of file
-user www-data;
+# user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
RUN groupadd -g 999 appuser && \
useradd -r -u 999 -g appuser appuser
+
+## add permissions for appuser user
+RUN chown -R appuser:appuser /usr/src/app/ && chmod -R 755 /usr/src/app/ && \
+ chown -R appuser:appuser /var/log/nginx && \
+ chown -R appuser:appuser /var/lib/nginx && \
+ chown -R appuser:appuser /etc/nginx/conf.d
+RUN touch /var/run/nginx.pid && \
+ chown -R appuser:appuser /var/run/nginx.pid
+
USER appuser
CMD [ "./start.sh" ]
-user www-data;
+# user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
RUN pip install -r requirements.txt
+RUN groupadd -g 999 appuser && \
+ useradd -r -u 999 -g appuser appuser
+
+USER appuser
+
CMD [ "python3", "-u", "message_generator.py" ]
RUN pip install -r requirements.txt
+RUN groupadd -g 999 appuser && \
+ useradd -r -u 999 -g appuser appuser
+
+USER appuser
+
CMD [ "python3", "-u", "sdnr_simulator.py" ]