Browse Source

Copy docker files/config to root directory

pull/21/head
ioedeveloper 2 years ago
parent
commit
74dfc105aa
  1. 30
      .circleci/config.yml
  2. 6
      Dockerfile
  3. 28
      Dockerfile.dev
  4. BIN
      apps/remix-ide/assets/img/icon.png
  5. 2
      apps/remix-ide/ci/build_and_publish_docker_images.sh
  6. 2
      apps/remix-ide/index.html
  7. 15
      build.yaml
  8. 18
      docker-compose.yaml
  9. 2
      workspace.json

30
.circleci/config.yml

@ -34,7 +34,7 @@ jobs:
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
resource_class: xlarge
resource_class: xlarge
# - image: circleci/mongo:3.4.4
environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
@ -189,6 +189,29 @@ jobs:
- store_artifacts:
path: ./apps/remix-ide/reports/screenshots
publish-docker:
docker:
# specify the version you desire here
- image: circleci/node:10.19.0-buster
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
resource_class: xlarge
# - image: circleci/mongo:3.4.4
environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
- COMMIT_AUTHOR: "Circle CI"
- FILES_TO_PACKAGE: "apps/remix-ide/assets apps/remix-ide/background.js apps/remix-ide/build apps/remix-ide/icon.png apps/remix-ide/index.html apps/remix-ide/manifest.json apps/remix-ide/README.md apps/remix-ide/soljson.js apps/remix-ide/package.json"
working_directory: ~/remix-project
steps:
- checkout
- setup_remote_docker
- run: npm install
- run: npm run build
- run: ./apps/remix-ide/ci/build_and_publish_docker_images.sh
deploy-remix-alpha:
docker:
# specify the version you desire here
@ -235,6 +258,11 @@ workflows:
- remix-ide-run-deploy:
requires:
- remix-libs
- publish-docker:
requires:
- remix-ide-chrome
- remix-ide-firefox
- remix-ide-run-deploy
- deploy-remix-live:
requires:
- remix-ide-chrome

6
Dockerfile

@ -0,0 +1,6 @@
FROM nginx:alpine
WORKDIR /
COPY ./temp_publish_docker/ /usr/share/nginx/html/
EXPOSE 80

28
Dockerfile.dev

@ -0,0 +1,28 @@
# This dockerfile is to build each branch seperately (for dev purposes)
FROM node:10
# Create Remix user, don't use root!
# RUN yes | adduser --disabled-password remix && mkdir /app
# USER remix
# #Now do remix stuff
# USER remix
WORKDIR /home/remix
COPY ./ ./
RUN npm ci
RUN npm run build
FROM nginx:alpine
WORKDIR /
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

BIN
apps/remix-ide/assets/img/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

2
apps/remix-ide/ci/build_and_publish_docker_images.sh

@ -12,5 +12,5 @@ mkdir temp_publish_docker
cp -r $FILES_TO_PACKAGE temp_publish_docker
docker login --username $DOCKER_USER --password $DOCKER_PASS
docker-compose -f docker-compose.yaml -f build.yaml build
docker-compose -f ../../../docker-compose.yaml -f ../../../build.yaml build
docker push remixproject/remix-ide:$TAG

2
apps/remix-ide/index.html

@ -29,7 +29,7 @@
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>Remix - Ethereum IDE</title>
<link rel="stylesheet" href="assets/css/pygment_trac.css">
<link rel="icon" type="x-icon" href="icon.png">
<link rel="icon" type="x-icon" href="assets/img/icon.png">
<script src="assets/js/browserfs.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
</head>

15
build.yaml

@ -0,0 +1,15 @@
version: "3.7"
x-project-base:
&project-base
restart: always
networks:
- remixide
networks:
remixide:
services:
remixide:
build:
context: .
dockerfile: Dockerfile

18
docker-compose.yaml

@ -0,0 +1,18 @@
version: "3.7"
x-project-base:
&project-base
restart: always
networks:
- remixide
networks:
remixide:
services:
remixide:
<<: *project-base
image: remixproject/remix-ide:$TAG
container_name: remixide-${TAG}
ports:
- 8080:80
- 65520:65520

2
workspace.json

@ -22,7 +22,7 @@
"styles": [],
"scripts": [],
"webpackConfig": "apps/remix-ide/webpack.config.js",
"maxWorkers": 6
"maxWorkers": 2
},
"configurations": {
"production": {

Loading…
Cancel
Save