Skip to content

Commit

Permalink
add(): Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Kwinin committed Aug 2, 2020
1 parent 7d590e5 commit 1b0a3dd
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
gist_token = <token>
account_passphrase = <passphrase>
account_password = <password>
gist_token=<token>
account_passphrase=<passphrase>
account_password=<password>
26 changes: 26 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This dockerfile is to build each branch seperately (for dev purpouses)
FROM node:10
# Create Remix user, don't use root!
# #Now do remix stuff
# USER remix


COPY . ./home/remix
WORKDIR /home/remix

RUN npm install --registry=https://registry.npm.taobao.org
RUN npm run build

FROM nginx:latest AS PROD
WORKDIR /usr/share/nginx/html

COPY --from=0 /home/remix/build/ /usr/share/nginx/html/build/
COPY --from=0 /home/remix/index.html /usr/share/nginx/html/index.html
COPY --from=0 /home/remix/nginx.conf /etc/nginx/nginx.conf
COPY --from=0 /home/remix/assets/ /usr/share/nginx/html/assets/
COPY --from=0 /home/remix/icon.png /usr/share/nginx/html/icon.png
COPY --from=0 /home/remix/background.js /usr/share/nginx/html/background.js
COPY --from=0 /home/remix/soljson.js /usr/share/nginx/html/soljson.js
COPY --from=0 /home/remix/package.json /usr/share/nginx/html/package.json

EXPOSE 80 65520
8 changes: 8 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: "3.7"
services:
remix_ide:
image: remix-ide:latest
container_name: remixide-latest
ports:
- 8080:80
- 65520:65520
Empty file modified index.html
100644 → 100755
Empty file.
40 changes: 40 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
user nginx;
worker_processes 1;

error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;

events {
worker_connections 1024;
}

http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main;

sendfile on;
keepalive_timeout 300;
gzip_disable "msie6";

include /etc/nginx/conf.d/*.conf;

server {
listen 80 default_server;
listen [::]:80 default_server;

root /usr/share/nginx/html;

index index.html index.htm;

server_name _;

location / {
try_files $uri $uri/ /index.html;
}
}
}

0 comments on commit 1b0a3dd

Please sign in to comment.