github action for docker
parent
633630807d
commit
68e4a5357c
|
@ -14,3 +14,10 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- run: cd server && npm install && npx -y tsc
|
||||
test-docker:
|
||||
timeout-minutes: 10
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Build containers
|
||||
run: docker-compose -f "docker-compose.yml" build
|
|
@ -34,4 +34,6 @@ RUN npm install
|
|||
|
||||
COPY ./server/src ./src
|
||||
|
||||
RUN CI=true cd /app && npm run start
|
||||
|
||||
COPY --from=build /app/build /app/public
|
|
@ -25,6 +25,10 @@ process.on('unhandledRejection', (reason, p) => {
|
|||
console.error('Unhandled Rejection at: Promise', p, 'reason:', reason);
|
||||
});
|
||||
|
||||
if (process.env.CI) {
|
||||
setTimeout(() => process.exit(), 10000);
|
||||
}
|
||||
|
||||
const port = process.env.PORT ? parseInt(process.env.PORT, 10) : 3001;
|
||||
const webappPort = process.env.WEBAPP_PORT ? parseInt(process.env.WEBAPP_PORT, 10) : 3000;
|
||||
const origins = (process.env.ALLOWED_ORIGINS || '').split(',');
|
||||
|
|
Loading…
Reference in New Issue