Skip to content

Commit

Permalink
chore: update docker compose yml & readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
maslow committed Apr 14, 2022
1 parent fbfa3a9 commit f2a2661
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,15 @@ docker pull lafyun/app-service:latest
# launch laf.js services
docker-compose up

# start laf.js local client
cd packages/system-client
npm run dev
# Now open http://console.local-dev.host:8080 in your browsers!

```

> TIPs:
> We provide `*.local-dev.host` always resolved to `127.0.0.1` anywhere!
> Close your VPN then `local-dev.host` resolving works well.

## 测试用例

### 启动 mongodb 测试容器
Expand Down
10 changes: 4 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,16 @@ services:
- mongo
- system-server
environment:
DEPLOY_DOMAIN: "*.local-dev.host" # `*.local-dev.host` always resolved to 127.0.0.1, used to local development
DEPLOY_FS_DOMAIN: "*.fs.local-dev.host"
DEPLOY_DOMAIN: "*.local-dev.host" # `*.local-dev.host` always resolved to 127.0.0.1, used to local development
DEPLOY_FS_DOMAIN: "*.fs.local-dev.host"
SYS_CLIENT_HOST: console.local-dev.host
DOCS_HOST: docs.local-dev.host
volumes:
- ./packages/gateway/scripts:/scripts
- ./packages/system-client/dist:/app
- ./packages/app-console/dist:/app-console
- ./docs/.vitepress/dist:/docs
- ./packages/gateway/conf.docker/app.conf:/etc/nginx/templates/app.conf.template
- ./packages/gateway/conf.docker/system.conf:/etc/nginx/templates/system.conf.template
- ./packages/gateway/conf.docker/fs-proxy.conf:/etc/nginx/templates/fs-proxy.conf.template
- ./packages/gateway/conf.docker:/conf.docker
command: "sh /scripts/start.sh"
ports:
- 8080:80
Expand Down Expand Up @@ -103,7 +101,7 @@ services:

volumes:
db-data:

networks:
laf_shared_network:
external: true
5 changes: 0 additions & 5 deletions packages/gateway/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
FROM openresty/openresty:latest
RUN apt-get update && apt-get install -y wget

# ENV DOCKERIZE_VERSION v0.6.1
# RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
# && tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
# && rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz

WORKDIR /app
EXPOSE 80

Expand Down

0 comments on commit f2a2661

Please sign in to comment.