customizable docker port

This commit is contained in:
2021-03-11 22:04:52 +03:00
committed by Stepan Usatiuk
parent c5bcbb0f38
commit f0c5f358db
3 changed files with 8 additions and 5 deletions

View File

@@ -16,7 +16,7 @@ WORKDIR frontend
RUN npm run build RUN npm run build
WORKDIR ../ WORKDIR ../
ENV PORT=8080 #ENV PORT=8080
ENV DATA_DIR=data ENV DATA_DIR=data
ENV TYPEORM_CONNECTION=mariadb ENV TYPEORM_CONNECTION=mariadb
@@ -36,7 +36,7 @@ ENV TYPEORM_SUBSCRIBERS_DIR=src/subscriber
ENV TYPEORM_DRIVER_EXTRA='{"charset": "utf8mb4"}' ENV TYPEORM_DRIVER_EXTRA='{"charset": "utf8mb4"}'
ENV NODE_ENV=production ENV NODE_ENV=production
EXPOSE 8080 #EXPOSE 8080
RUN ["chmod", "+x", "dockerentry.sh"] RUN ["chmod", "+x", "dockerentry.sh"]

View File

@@ -32,7 +32,9 @@ is listening at http://localhost:1234, and koa at http://localhost:3000)
The suggested way to host this is, agian, using Docker: you can find a The suggested way to host this is, agian, using Docker: you can find a
docker-compose example in `dockercomposeexample` folder docker-compose example in `dockercomposeexample` folder
### Config options (for docker container) ### Config options
* `PORT` - web server port
* `TYPEORM_HOST` - mariadb hostname * `TYPEORM_HOST` - mariadb hostname
@@ -48,6 +50,6 @@ docker-compose example in `dockercomposeexample` folder
* `HTTPS` (`"yes"`/`"no"`) - whether the server enforce HTTPS or not * `HTTPS` (`"yes"`/`"no"`) - whether the server enforce HTTPS or not
### Config options (the rest of them) ### Additional config options if you're not using docker
* `DATA_DIR` - data directory for photos and uploaded files * `DATA_DIR` - data directory for photos and uploaded files

View File

@@ -9,6 +9,7 @@ services:
- ./data:/usr/src/app/data - ./data:/usr/src/app/data
environment: environment:
- JWT_SECRET=huegrhuigerhupoiervw - JWT_SECRET=huegrhuigerhupoiervw
- PORT=8080
env_file: env_file:
- db.env - db.env
depends_on: depends_on: