1
Fork 0

Add a dockerfile

Might be useful soon...
This commit is contained in:
Jake Howard 2022-02-13 16:04:23 +00:00
parent 4bb0d941d5
commit b7661b5b02
Signed by: jake
GPG key ID: 57AFB45680EDD477
4 changed files with 59 additions and 0 deletions

3
.dockerignore Normal file
View file

@ -0,0 +1,3 @@
node_modules
resources
static/build

View file

@ -63,3 +63,13 @@ deploy:
RCLONE_CONFIG_PAGES_TYPE: webdav RCLONE_CONFIG_PAGES_TYPE: webdav
RCLONE_CONFIG_PAGES_URL: https://pages.theorangeone.net RCLONE_CONFIG_PAGES_URL: https://pages.theorangeone.net
RCLONE_CONFIG_PAGES_USER: github RCLONE_CONFIG_PAGES_USER: github
container:
image: docker:stable
stage: deploy
dependencies:
- build
only:
- master
script:
- docker build -f prod/Dockerfile -t theorangeone.net .

5
prod/Dockerfile Normal file
View file

@ -0,0 +1,5 @@
FROM nginx:alpine
COPY prod/nginx.conf /etc/nginx/nginx.conf
COPY ./public/ /usr/share/nginx/html

41
prod/nginx.conf Normal file
View file

@ -0,0 +1,41 @@
user nginx;
worker_processes auto;
error_log stderr;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /dev/stdout;
sendfile on;
keepalive_timeout 65;
gzip on;
server {
listen 80;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
}