mirror of
https://github.com/steedos/steedos-platform
synced 2024-11-22 00:01:52 +00:00
add config
This commit is contained in:
parent
c890245028
commit
bf5d51f2ce
36
.gitpod.Dockerfile
vendored
Normal file
36
.gitpod.Dockerfile
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
FROM gitpod/workspace-base:latest
|
||||
|
||||
|
||||
# Install MongoDB
|
||||
# Source: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu-tarball/#install-mongodb-community-edition
|
||||
USER gitpod
|
||||
RUN mkdir -p /tmp/mongodb && \
|
||||
cd /tmp/mongodb && \
|
||||
wget -qOmongodb.tgz https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1804-4.2.17.tgz && \
|
||||
tar xf mongodb.tgz && \
|
||||
cd mongodb-* && \
|
||||
sudo cp bin/* /usr/local/bin/ && \
|
||||
rm -rf /tmp/mongodb
|
||||
|
||||
# Install node
|
||||
USER gitpod
|
||||
ENV NODE_VERSION=12.22.7
|
||||
ENV TRIGGER_REBUILD=1
|
||||
RUN curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | PROFILE=/dev/null bash \
|
||||
&& bash -c ". .nvm/nvm.sh \
|
||||
&& nvm install $NODE_VERSION \
|
||||
&& nvm alias default $NODE_VERSION \
|
||||
&& npm install -g typescript yarn node-gyp"
|
||||
ENV PATH=$PATH:/home/gitpod/.nvm/versions/node/v${NODE_VERSION}/bin
|
||||
|
||||
# Install Redis
|
||||
USER gitpod
|
||||
RUN wget https://download.redis.io/releases/redis-6.2.6.tar.gz && \
|
||||
tar xzf redis-6.2.6.tar.gz && \
|
||||
cd redis-6.2.6 && \
|
||||
make && \
|
||||
cd .. && \
|
||||
rm -f redis-6.2.6.tar.gz
|
||||
ENV PATH=$PATH:/home/gitpod/redis-6.2.6/src
|
||||
|
||||
USER gitpod
|
31
.gitpod.yml
Normal file
31
.gitpod.yml
Normal file
@ -0,0 +1,31 @@
|
||||
image:
|
||||
file: .gitpod.Dockerfile
|
||||
|
||||
# List the ports you want to expose and what to do when they are served. See https://www.gitpod.io/docs/config-ports/
|
||||
ports:
|
||||
- port: 5000
|
||||
onOpen: open-preview
|
||||
visibility: public
|
||||
# List the start up tasks. You can start them in parallel in multiple terminals. See https://www.gitpod.io/docs/config-start-tasks/
|
||||
tasks:
|
||||
- init: |
|
||||
mkdir -p /workspace/mongodb/data/db
|
||||
command: |
|
||||
mongod --replSet rs0 --dbpath /workspace/mongodb/data/db
|
||||
- command: |
|
||||
gp await-port 27017
|
||||
mongo steedos --eval "rs.initiate()"
|
||||
- command: |
|
||||
redis-server --save ""
|
||||
- init: |
|
||||
yarn install
|
||||
yarn bootstrap
|
||||
command: |
|
||||
gp await-port 27017
|
||||
gp await-port 6379
|
||||
export ROOT_URL=$(gp url 5000)
|
||||
yarn start
|
||||
|
||||
vscode:
|
||||
extensions:
|
||||
- dbaeumer.vscode-eslint
|
Loading…
Reference in New Issue
Block a user