Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
FROM node:12.16.3-alpine

# Add support for https on wget
RUN apk update && apk add --no-cache wget && apk --no-cache add openssl wget && apk add ca-certificates && update-ca-certificates
RUN apk update && apk add --no-cache wget nginx && apk --no-cache add openssl wget && apk add ca-certificates && update-ca-certificates

RUN mkdir -p /run/nginx
COPY nginx.conf /etc/nginx/conf.d/wakanda.conf

COPY crontab.txt ./
RUN crontab crontab.txt

WORKDIR /usr/src/certificate-worker

Expand All @@ -10,6 +16,6 @@ COPY package-lock.json ./

RUN npm install
COPY . .
RUN npm run build
RUN npm run generate

ENTRYPOINT ["npm", "run", "start"]
ENTRYPOINT ["nginx", "-g", "daemon off;"]
1 change: 1 addition & 0 deletions crontab.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* * * * * cd /usr/src/certificate-worker && yarn generate > /var/log/cron.log
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ services:
image: codingblocks/main-website
build: .
ports:
- "3000:3000"
- "3000:80"

9 changes: 9 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
server {
listen 80;
server_name ~^(.+)$;

location / {
alias /usr/src/certificate-worker/dist/;
try_files $uri / /index.html;
}
}