Skip to content

Commit 93f5dca

Browse files
author
Daniel Schmidt
committed
Support new Docker workflow
1 parent 33ae34f commit 93f5dca

File tree

7 files changed

+26
-17
lines changed

7 files changed

+26
-17
lines changed

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ RUN addgroup -Sg 40023 waam && \
1616
adduser -Su 40023 -G waam waam && \
1717
install -d -o waam -g waam /usr/src/app
1818

19-
2019
# Subsequent commands run relative to this directory.
2120
WORKDIR /usr/src/app
2221

@@ -25,8 +24,8 @@ RUN chown -Rh waam:waam /home/node
2524
USER waam
2625

2726
# Install Yarn
28-
RUN npm i -g corepack
29-
27+
RUN npm i -g corepack
28+
3029
# Install server dependencies.
3130
COPY --chown=waam package.json ./
3231
COPY --chown=waam yarn.lock ./
@@ -49,3 +48,5 @@ ENTRYPOINT ["npm"]
4948

5049
# The default command runs the server.
5150
CMD ["run", "server"]
51+
52+
ENV PATH=/usr/src/app/bin:$PATH

bin/generate-authors-search-indexes.js

100644100755
File mode changed.

bin/generate-manuscripts-search-indexes.js

100644100755
File mode changed.

bin/setup

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#!/bin/sh -e

bin/test

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh -e
2+
3+
wget localhost:3002 -O - 2> /dev/null | grep -q 'West African'

docker-compose.ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
3+
services:
4+
app:
5+
build: !reset
6+
image: "${DOCKER_APP_IMAGE}"

docker-compose.yml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,35 @@
1-
version: '3.7'
1+
---
2+
23
services:
3-
node:
4-
container_name: node
5-
build:
6-
context: .
7-
dockerfile: Dockerfile
4+
app:
5+
build: .
86
restart: always
97
ports:
108
- 3002:3002
119
secrets:
1210
- DATABASE_URL
1311

1412
db:
15-
image: mariadb:10.5.8
16-
container_name: db
13+
image: mariadb:10
1714
restart: always
1815
environment:
19-
MYSQL_ROOT_PASSWORD: root
20-
MYSQL_USER: amms2
21-
MYSQL_PASSWORD: amms2
22-
MYSQL_DATABASE: amms2
16+
- MYSQL_DATABASE=amms2
17+
- MYSQL_PASSWORD=amms2
18+
- MYSQL_ROOT_PASSWORD=root
19+
- MYSQL_USER=amms2
2320
volumes:
2421
- db-volume:/var/lib/mysql
2522
- ./data/test-data.sql:/docker-entrypoint-initdb.d/test-data.sql
2623
depends_on:
27-
- node
24+
- app
2825

2926
networks:
3027
default:
3128
driver: bridge
29+
3230
secrets:
3331
DATABASE_URL:
3432
file: secrets/DATABASE_URL
3533

3634
volumes:
37-
db-volume:
35+
db-volume:

0 commit comments

Comments
 (0)