Unverified Commit 9e82a043 authored by Christopher Guindon's avatar Christopher Guindon Committed by GitHub
Browse files

build www on make compile (#79)


Signed-off-by: Christopher Guindon's avatarChristopher Guindon <chris.guindon@eclipse-foundation.org>
parent 021d8ad7
...@@ -3,7 +3,7 @@ compile-java: validate-spec; ...@@ -3,7 +3,7 @@ compile-java: validate-spec;
compile-react: install-react; compile-react: install-react;
yarn --cwd src/main/www build yarn --cwd src/main/www build
compile: clean compile-react compile-java; compile: clean compile-react compile-java;
docker build -f src/main/docker/Dockerfile.jvm -t eclipsefdn/membership-rest-api . docker-compose build
clean:; clean:;
mvn clean mvn clean
rm -rf src/main/resources/META-INF/* rm -rf src/main/resources/META-INF/*
...@@ -14,5 +14,6 @@ validate-spec: install-react; ...@@ -14,5 +14,6 @@ validate-spec: install-react;
generate-cert:; generate-cert:;
rm -rf certs && mkdir -p certs rm -rf certs && mkdir -p certs
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout certs/www.rem.docker.key -out certs/www.rem.docker.crt openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout certs/www.rem.docker.key -out certs/www.rem.docker.crt
make compile-start: compile;
docker-compose down
docker-compose up
\ No newline at end of file
...@@ -115,7 +115,7 @@ REM_POSTGRES_PASSWORD=password_sample ...@@ -115,7 +115,7 @@ REM_POSTGRES_PASSWORD=password_sample
Once this initial setup is done, you can start these services with this command: Once this initial setup is done, you can start these services with this command:
```sh ```sh
docker-compose up make compile-start
``` ```
### KeyCloak Setup ### KeyCloak Setup
......
...@@ -12,6 +12,26 @@ services: ...@@ -12,6 +12,26 @@ services:
- VIRTUAL_HOST=www.rem.docker - VIRTUAL_HOST=www.rem.docker
- CHOKIDAR_USEPOLLING=true - CHOKIDAR_USEPOLLING=true
- VIRTUAL_PORT=3000 - VIRTUAL_PORT=3000
api:
build:
context: .
dockerfile: ./src/main/docker/Dockerfile.jvm
image: eclipsefdn/membership-rest-api:latest
ports:
- 8090
environment:
- VIRTUAL_HOST=api.rem.docker
- VIRTUAL_PORT=8090
- CONFIG_SECRET_PATH=/var/run/secrets/secret.properties
volumes:
- ./config/secret.properties:/var/run/secrets/secret.properties
deploy:
restart_policy:
condition: on-failure
max_attempts: 5
depends_on:
- mariadb
- keycloak
mariadb: mariadb:
image: mariadb:latest image: mariadb:latest
command: --max_allowed_packet=100000000 command: --max_allowed_packet=100000000
...@@ -74,18 +94,6 @@ services: ...@@ -74,18 +94,6 @@ services:
- VIRTUAL_HOST=ldap-admin.rem.docker - VIRTUAL_HOST=ldap-admin.rem.docker
- PHPLDAPADMIN_LDAP_HOSTS=ldap - PHPLDAPADMIN_LDAP_HOSTS=ldap
- PHPLDAPADMIN_HTTPS=false - PHPLDAPADMIN_HTTPS=false
api:
image: eclipsefdn/membership-rest-api:latest
ports:
- 8090
environment:
- VIRTUAL_HOST=api.rem.docker
- VIRTUAL_PORT=8090
- CONFIG_SECRET_PATH=/var/run/secrets/secret.properties
volumes:
- ./config/secret.properties:/var/run/secrets/secret.properties
depends_on:
- mariadb
nginx-proxy: nginx-proxy:
image: jwilder/nginx-proxy image: jwilder/nginx-proxy
ports: ports:
......
...@@ -9,7 +9,7 @@ ENV PATH /app/node_modules/.bin:$PATH ...@@ -9,7 +9,7 @@ ENV PATH /app/node_modules/.bin:$PATH
# add app # add app
COPY . ./ COPY . ./
RUN npm install RUN yarn
# start app # start app
CMD ["npm", "start"] CMD ["yarn", "start"]
\ No newline at end of file \ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment