Commit a52bafd 1 parent 4464644 commit a52bafd Copy full SHA for a52bafd
File tree 5 files changed +34
-12
lines changed
5 files changed +34
-12
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # This file contains all commands that shall be run on the docker container on startup
3
+ # openrc is there to allow rc-service to run. rc-service manages the nginx server and starts it
4
+ # nimstoryfont is the name of the binary that is the webapplication
5
+ openrc boot
6
+ rc-service nginx start
7
+ /nimstoryfont
Original file line number Diff line number Diff line change 28
28
#tcp_nopush on;
29
29
30
30
#keepalive_timeout 0;
31
- keepalive_timeout 65 ;
31
+ keepalive_timeout 600 ;
32
32
33
33
#gzip on;
34
34
Original file line number Diff line number Diff line change
1
+ [Unit]
2
+ Description =The nginx HTTP and reverse proxy server
3
+ After =network.target remote-fs.target nss-lookup.target
4
+
5
+ [Service]
6
+ Type =forking
7
+ PIDFile =/run/nginx.pid
8
+ # Nginx will fail to start if /run/nginx.pid already exists but has the wrong
9
+ # SELinux context. This might happen when running `nginx -t` from the cmdline.
10
+ # https://bugzilla.redhat.com/show_bug.cgi?id=1268621
11
+ ExecStartPre =/usr/bin/rm -f /run/nginx.pid
12
+ ExecStartPre =/usr/sbin/nginx -t -c /etc/nginx/nginx.conf
13
+ ExecStart =/usr/sbin/nginx -c /etc/nginx/nginx.conf
14
+ ExecReload =/bin/kill -s HUP $MAINPID
15
+ KillSignal =SIGQUIT
16
+ TimeoutStopSec =5
17
+ KillMode =process
18
+ PrivateTmp =true
19
+
20
+ [Install]
21
+ WantedBy =multi-user.target
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -2,8 +2,7 @@ FROM frolvlad/alpine-glibc
2
2
3
3
# Install dependencies
4
4
RUN apk update
5
- RUN apk add --no-cache nginx openrc
6
- RUN apk add --no-cache sqlite-libs
5
+ RUN apk add --no-cache openrc nginx sqlite-libs
7
6
8
7
# Expose Ports -- Mostly documentation for later
9
8
#EXPOSE 80/tcp
@@ -12,8 +11,8 @@ RUN apk add --no-cache sqlite-libs
12
11
13
12
# Copy necessary files
14
13
COPY ./nimstoryfont .
15
- COPY ./config/nginx.conf /etc/nginx/nginx.conf
16
- COPY ./config/dockerSettings.json /settings.json
14
+ COPY ./buildFiles/ config/nginx.conf /etc/nginx/nginx.conf
15
+ COPY ./buildFiles/ config/dockerSettings.json /settings.json
17
16
RUN chmod 777 /settings.json
18
17
19
18
# Setup necessary directories
@@ -27,10 +26,10 @@ RUN mkdir /frontend
27
26
# Mount external directories
28
27
29
28
#Startup command
30
- COPY ./config/dockerStartScript.sh .
29
+ COPY ./buildFiles/ config/dockerStartScript.sh .
31
30
RUN chmod +x /dockerStartScript.sh
32
31
33
- CMD ["/dockerStartScript.sh"]
32
+ # CMD ["/dockerStartScript.sh"]
34
33
35
34
## https://www.tutorialspoint.com/how-do-i-get-into-a-docker-container-s-shell
36
35
## https://www.youtube.com/watch?v=SnSH8Ht3MIc
You can’t perform that action at this time.
0 commit comments