Skip to content

Commit 995ccde

Browse files
committed
new server changes
1 parent bb51bb9 commit 995ccde

29 files changed

+6829
-510
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
node_modules
22
.env
33
base-all/data/arduino/staging
4-
Arduino
4+
Arduino
5+
sls-config.yml
6+
.serverless

Dockerfile

Lines changed: 9 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
FROM node:10-buster
1+
FROM node:12-buster
22

33
USER root
44
RUN useradd duino
55

6-
COPY setup/index.js /home/duino/setup/index.js
7-
COPY setup/arduino-cli.yml /home/duino/data/arduino-cli.yml
6+
RUN mkdir -p /mnt/duino-data
7+
RUN chmod 0777 /mnt/duino-data
8+
9+
COPY setup /home/duino/setup
10+
RUN chmod +x /home/duino/setup/*.sh
811
# COPY Arduino /home/duino/Arduino
912

1013
# RUN mkdir /home/duino
@@ -14,39 +17,12 @@ RUN apt-get update && apt-get install build-essential -y
1417
WORKDIR /home/duino
1518
USER duino
1619

17-
RUN wget https://github.com/arduino/arduino-cli/releases/download/0.13.0/arduino-cli_0.13.0_Linux_64bit.tar.gz -O - | tar -xz
18-
19-
RUN ls
20-
21-
22-
ENV CLI_ARGS="--config-file /home/duino/data/arduino-cli.yml --format json"
23-
RUN ./arduino-cli core update-index ${CLI_ARGS}
24-
RUN ./arduino-cli core search "" ${CLI_ARGS} > /home/duino/data/cores.json
25-
26-
RUN ./arduino-cli lib update-index ${CLI_ARGS}
27-
RUN ./arduino-cli lib search "" ${CLI_ARGS} > /home/duino/data/libs.json
28-
29-
RUN node setup/ cores
30-
RUN node setup/ boards
31-
32-
USER root
3320
COPY package*.json /home/duino/
34-
RUN chown duino:duino /home/duino/package*.json
35-
RUN apt-get install nano
36-
USER duino
37-
3821
RUN npm ci
3922

40-
USER root
4123
COPY src /home/duino/src
42-
RUN chown duino:duino /home/duino/src -R
43-
RUN mkdir /data
44-
RUN chmod 0777 /data
45-
COPY entrypoint.sh /home/duino/
46-
COPY load-libs.sh /home/duino/
47-
RUN chmod +x ./*.sh
48-
RUN chown duino:duino ./*.sh
49-
USER duino
24+
25+
RUN node ./setup/docker-install.js
5026

5127
EXPOSE 3030
52-
CMD [ "./entrypoint.sh" ]
28+
CMD [ "node", "src/index.js" ]

deployment/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Theses are some files to help make deploying on a remote server easier.
44
This assumes a fresh VPS with Ubuntu 20 +, that is only going to be used as
5-
a compile server. A minimum of 20GB of storage is required.
5+
a compile server.
66

77
VPS = Virtual Private Server
88

deployment/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ services:
2626
container_name: duinoapp
2727
restart: unless-stopped
2828
volumes:
29-
- duinoapp-lib-downloads:/data
29+
- duinoapp-lib-downloads:/mnt/duino-data/lib-downloads
3030
environment: # update these, server info displayed to users
3131
- SERVER_INFO_NAME=Example Server
3232
- SERVER_INFO_LOCATION=Australia/Sydney

entrypoint.sh

Lines changed: 0 additions & 4 deletions
This file was deleted.

load-libs.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)