Skip to content

Commit

Permalink
Merge pull request #330 from AmpersandTarski/feature/329-Update-RAP-f…
Browse files Browse the repository at this point in the history
…ront-end-image

Feature/329 update rap front end image
  • Loading branch information
FranSlot committed Nov 28, 2023
2 parents 15be742 + 969addf commit 5aea878
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 25 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ Testing/Gatling/target
Testing/Gatling/results
Testing/Gatling/src/test/results
Testing/Gatling/src/test/resources/recorder.conf

gatling-3-7-2/
16 changes: 8 additions & 8 deletions RAP4/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This script is meant to build from the root directory of your RAP-repo.
# Ampersand compiler is also needed for RAP4 to compile student scripts

FROM ampersandtarski/prototype-framework:v1.12.0
FROM ampersandtarski/prototype-framework:main
# this prototype-framework builds on an Apache server

# Install docker, so students can run their prototypes
Expand Down Expand Up @@ -46,10 +46,10 @@ WORKDIR /var/www
# Copy customizations into generated application
COPY customizations /var/www/

RUN chown -R www-data:www-data /var/www/data /var/www/log /var/www/generics \
&& composer install --prefer-dist --no-dev --profile --optimize-autoloader \
&& npm update \
&& npm audit fix \
&& npm install \
&& gulp build-ampersand \
&& gulp build-project
RUN chown -R www-data:www-data /var/www/data /var/www/generics
RUN composer install --prefer-dist --no-dev --profile --optimize-autoloader
RUN npm update
#RUN npm audit fix
RUN npm install
RUN gulp build-ampersand
RUN gulp build-project
6 changes: 3 additions & 3 deletions RAP4USER/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM ampersandtarski/prototype-framework:v1.12.0
FROM ampersandtarski/prototype-framework:main

COPY --from=ampersandtarski/ampersand:v4.6.0 /bin/ampersand /usr/local/bin
RUN chmod +x /usr/local/bin/ampersand
# COPY --from=ampersandtarski/ampersand:v4.6.0 /bin/ampersand /usr/local/bin
# RUN chmod +x /usr/local/bin/ampersand

COPY run-student-prototype.sh /

Expand Down
4 changes: 2 additions & 2 deletions RAP4USER/run-student-prototype.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ampersand proto /script.adl \
--proto-dir=/var/www \
--verbose

chown -R www-data:www-data /var/www/log /var/www/data /var/www/generics
chown -R www-data:www-data /var/www/data /var/www/generics

if [[ -n $RAP_DEPLOYMENT && $RAP_DEPLOYMENT == "Kubernetes" ]]; then
# Kubernetes: Start Apache webserver to run/serve prototype (foreground)
Expand All @@ -31,4 +31,4 @@ else

# Sleep/wait 3600 sec
sleep 3600
fi
fi
32 changes: 20 additions & 12 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,20 @@ version: '3.7'
# run it literally (change NOTHING!) and expect the result in documentation/docker-compose.png

volumes:
rap4-data:
rap4-data:
db-data:
letsencrypt:


networks:
proxy: # network name is used by RAP4 script to make student prototype container accessible via traefik ingress
proxy:
# network name is used by RAP4 script to make student prototype container accessible via traefik ingress
external: true # must be external to prevent prefix with folder name
rap_db: # network name is used by RAP4 script to let student prototype container connect to database
rap_db:
# network name is used by RAP4 script to let student prototype container connect to database
external: true # must be external to prevent prefix with folder name
testchannel: # network testchannel is used by the test-elf to run API-tests on rap4
testchannel:
# network testchannel is used by the test-elf to run API-tests on rap4

services:
# reverse proxy
Expand All @@ -31,14 +35,14 @@ services:
- "letsencrypt:/letsencrypt"
networks:
- proxy

dummy-student-prototype:
image: ampersandtarski/rap4-student-prototype:v1.1.1
image: ampersandtarski/rap4-student-prototype:dev-latest
build:
context: RAP4USER

rap4:
image: ampersandtarski/ampersand-rap:2021-10-22
image: ampersandtarski/ampersand-rap:latest
container_name: rap4
build:
context: RAP4
Expand Down Expand Up @@ -78,7 +82,7 @@ services:
max-size: "200k"
max-file: "100"

# demo application Enrollment
# demo application Enrollment
enroll:
image: ampersandtarski/enroll:latest
container_name: enroll
Expand Down Expand Up @@ -110,15 +114,19 @@ services:
options:
max-size: "200k"
max-file: "100"

db:
container_name: rap4-db
image: mariadb:10.4
restart: always
command: ["--lower-case-table-names=1", "--sql-mode=ANSI,TRADITIONAL"] # Whatever is specified here gets appended to the entrypoint defined in the Dockerfile
command:
[
"--lower-case-table-names=1",
"--sql-mode=ANSI,TRADITIONAL"
] # Whatever is specified here gets appended to the entrypoint defined in the Dockerfile
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD} # from .env file, which must be in the build environment
- MYSQL_USER=ampersand # the database user is fixed. No need to make this variable.
- MYSQL_USER=ampersand # the database user is fixed. No need to make this variable.
- MYSQL_PASSWORD=${MYSQL_AMPERSAND_PASSWORD} # from .env file
volumes:
- db-data:/var/lib/mysql
Expand Down Expand Up @@ -150,7 +158,7 @@ services:
- proxy

test-elf:
image: ampersandtarski/gatling:3.7.2
image: ampersandtarski/gatling:3.7.2
container_name: gatling
build:
context: gatling-3-7-2
Expand Down

0 comments on commit 5aea878

Please sign in to comment.