Add a dockerfile
Might be useful soon...
This commit is contained in:
parent
4bb0d941d5
commit
b7661b5b02
4 changed files with 59 additions and 0 deletions
3
.dockerignore
Normal file
3
.dockerignore
Normal file
|
@ -0,0 +1,3 @@
|
|||
node_modules
|
||||
resources
|
||||
static/build
|
|
@ -63,3 +63,13 @@ deploy:
|
|||
RCLONE_CONFIG_PAGES_TYPE: webdav
|
||||
RCLONE_CONFIG_PAGES_URL: https://pages.theorangeone.net
|
||||
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
5
prod/Dockerfile
Normal 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
41
prod/nginx.conf
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue