Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mieubrisse/fix dockerfiles #529

Open
wants to merge 64 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
a32bce3
Merge pull request #203 from near/master
vgrichina Aug 18, 2020
c851386
Merge pull request #209 from near/master
vgrichina Aug 19, 2020
647c1c7
Merge pull request #216 from near/master
vgrichina Sep 1, 2020
f03b4e0
Merge pull request #223 from near/master
vgrichina Sep 3, 2020
4dd7721
Merge pull request #224 from near/master
vgrichina Sep 5, 2020
ec9a0e0
Merge pull request #232 from near/master
vgrichina Sep 10, 2020
4f24184
Merge pull request #236 from near/master
vgrichina Sep 16, 2020
70be1a8
Merge pull request #253 from near/master
vgrichina Oct 13, 2020
0a1e44e
Merge pull request #267 from near/master
vgrichina Nov 5, 2020
6d6a3ff
Merge pull request #282 from near/master
vgrichina Dec 7, 2020
3c6c700
Merge pull request #296 from near/master
vgrichina Dec 22, 2020
8189ff0
Merge pull request #298 from near/master
vgrichina Dec 24, 2020
3551bcd
Revert "Release 2020-12-23"
ilblackdragon Dec 29, 2020
76355c0
Merge pull request #299 from near/revert-298-master
ilblackdragon Dec 29, 2020
80f388f
Revert "Revert "Release 2020-12-23""
vgrichina Dec 29, 2020
6615da2
Merge pull request #301 from near/revert-299-revert-298-master
vgrichina Dec 29, 2020
47f66b5
Merge pull request #306 from near/master
vgrichina Jan 8, 2021
f61f5f5
Merge pull request #315 from near/master
vgrichina Jan 26, 2021
4b04294
Merge pull request #320 from near/master
vgrichina Feb 4, 2021
89bffda
Merge pull request #331 from near/master
vgrichina Feb 28, 2021
638ed6f
Merge pull request #350 from near/master
vgrichina Mar 18, 2021
ab17ca8
Merge pull request #359 from near/master
vgrichina Apr 2, 2021
8dc2b4a
Merge pull request #367 from near/master
vgrichina Apr 10, 2021
b0cd5e4
Merge pull request #375 from near/master
vgrichina Apr 22, 2021
1d2c3b5
Merge pull request #403 from near/master
MaximusHaximus May 12, 2021
b4f7422
Merge pull request #425 from near/master
vgrichina May 29, 2021
a74606f
Merge pull request #444 from near/master
MaximusHaximus Jun 10, 2021
e20142a
Merge pull request #445 from near/master
MaximusHaximus Jun 11, 2021
44581e5
Merge pull request #449 from near/master
MaximusHaximus Jun 17, 2021
531c603
Merge pull request #456 from near/master
MaximusHaximus Jul 1, 2021
e428364
Merge pull request #472 from near/master
MaximusHaximus Jul 28, 2021
54648cb
Merge pull request #479 from near/master
MaximusHaximus Aug 30, 2021
dc8bc61
Merge pull request #481 from near/master
MaximusHaximus Aug 31, 2021
3093524
Merge pull request #487 from near/master
MaximusHaximus Sep 9, 2021
02f9d82
Merge pull request #489 from near/master
MaximusHaximus Sep 10, 2021
4e12d8a
Merge pull request #491 from near/master
MaximusHaximus Sep 10, 2021
8b8fb5d
Merge pull request #493 from near/master
MaximusHaximus Sep 13, 2021
ed0ab09
Merge pull request #495 from near/master
MaximusHaximus Sep 13, 2021
afb4720
Merge pull request #497 from near/master
MaximusHaximus Sep 17, 2021
62c6914
Merge pull request #499 from near/master
MaximusHaximus Sep 17, 2021
90edc54
Merge pull request #501 from near/master
MaximusHaximus Sep 17, 2021
95ab14b
Merge pull request #503 from near/master
MaximusHaximus Sep 18, 2021
96f4404
Merge pull request #505 from near/master
MaximusHaximus Sep 20, 2021
38dd340
Merge pull request #507 from near/master
MaximusHaximus Sep 21, 2021
ccd3cd6
Merge pull request #509 from near/master
MaximusHaximus Sep 21, 2021
4ca21d7
Merge pull request #511 from near/master
MaximusHaximus Sep 21, 2021
11cb217
Merge pull request #513 from near/master
MaximusHaximus Sep 21, 2021
7eb3756
Merge pull request #515 from near/master
MaximusHaximus Sep 21, 2021
2df0952
Merge pull request #519 from near/master
MaximusHaximus Sep 22, 2021
43aa10f
Merge pull request #521 from near/master
MaximusHaximus Sep 24, 2021
0960483
Merge pull request #523 from near/master
MaximusHaximus Sep 25, 2021
e0c2ae2
Merge pull request #528 from near/master
MaximusHaximus Oct 6, 2021
9de59bb
Fix Dockerfile
Oct 12, 2021
c92be22
Remove now-unused DB stuff
Oct 12, 2021
49c9194
Add comment to gitpod about the create_dev_dbs script not working any…
Oct 12, 2021
57d2eb8
Fix bug in Dockerfile
Oct 18, 2021
ef41710
Merge pull request #534 from near/master
MaximusHaximus Dec 1, 2021
99d45d3
Merge pull request #538 from near/master
MaximusHaximus Dec 15, 2021
c3f2934
Merge pull request #541 from near/master
MaximusHaximus Dec 23, 2021
a7dfb09
Merge pull request #544 from near/master
MaximusHaximus Jan 14, 2022
c25fb84
Merge pull request #546 from near/master
MaximusHaximus Jan 20, 2022
80d38f6
Merge pull request #553 from near/master
MaximusHaximus Feb 8, 2022
b6a8d0f
Merge branch 'stable' into mieubrisse/fix-dockerfiles
Feb 9, 2022
a352938
Merge branch 'master' into mieubrisse/fix-dockerfiles
Feb 22, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
image: gitpod/workspace-postgres
tasks:
# NOTE: As of 2021-1012, the contract helper DB seems to use the indexer DB so this likely won't work anymore
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't true actually -- we use the indexer DB for some things, like finding all accounts for a given public key, or finding recent transactions, but the accounts and recovery methods are entirely a wallet construction, not part of the indexer/on-chain data, and still provided by the local accounts SQL DB instance.

- init: yarn && ./scripts/create_dev_dbs.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like this PR deletes this file, but still references it here in the init clause... can you confirm that we don't need create_dev_dbs.sh in the gitpod.yml file? AFAIK it is necessary to configure the Postgres gitpod instance.

github:
prebuilds:
Expand Down
7 changes: 2 additions & 5 deletions Dockerfile.app
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
FROM nearprotocol/bridge as bridge
# TODO pin Node version so the image isn't constantly updating under us?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think pinning it to the major version is fine, especially since we intentionally stick to LTS versions (not bleeding edge) where breaking changes are highly unlikely...

FROM node:12
WORKDIR /usr/app
COPY ./package.json .
COPY ./yarn.lock .
RUN yarn
COPY . .
RUN grep -v ACCOUNT_CREATOR_KEY .env.sample | grep -v NODE_URL | grep -v INDEXER_DB_CONNECTION > .env
COPY --from=bridge /root/.near/localnet/node0/validator_key.json .
RUN ACCOUNT_CREATOR_KEY=$(cat validator_key.json | tr -d " \t\n\r") && echo "ACCOUNT_CREATOR_KEY=$ACCOUNT_CREATOR_KEY" >> .env
CMD ["sh", "-c", "sleep 10 && yarn migrate && yarn start"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This yarn migrate command is critical -- without it, the target SQL DB will not be in a sane state, because migrations must be run against the SQL DB before it is usable (they are responsible for creating indexes and creating some tables)

CMD ["sh", "-c", "yarn start-without-env"]
3 changes: 0 additions & 3 deletions Dockerfile.db

This file was deleted.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "Micro-service used by NEARStudio to deploy smart contracts.",
"main": "app.js",
"scripts": {
"start": "env $(sed 's/ # .*//' .env) supervisor app",
"start-without-env": "supervisor app",
"start": "env $(sed 's/ # .*//' .env) yarn start-without-env",
"test": "yarn lint && mocha",
"lint": "eslint .",
"fix": "eslint . --fix",
Expand Down
9 changes: 0 additions & 9 deletions scripts/create_dev_dbs.sh

This file was deleted.