Skip to content

Commit

Permalink
Migrate Docker images (#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinejaussoin authored Oct 13, 2021
1 parent 303fbd4 commit 54ed218
Show file tree
Hide file tree
Showing 20 changed files with 224 additions and 91 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/alpha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'Alpha Build'

on:
push:
branches: [v490/docs]
branches: [v490/docker-change]

jobs:
build:
Expand Down Expand Up @@ -32,16 +32,16 @@ jobs:
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
username: ${{ secrets.DOCKER_NEW_USERNAME }}
password: ${{ secrets.DOCKER_NEW_PASSWORD }}

- name: Build and push Documentation
uses: docker/build-push-action@v2
with:
builder: ${{ steps.buildx.outputs.name }}
file: docs/Dockerfile
context: docs
tags: antoinejaussoin/retro-board-docs:alpha
tags: retrospected/docs:alpha
platforms: linux/amd64
push: true

Expand All @@ -51,7 +51,7 @@ jobs:
builder: ${{ steps.buildx.outputs.name }}
file: backend/Dockerfile
context: .
tags: antoinejaussoin/retro-board-backend:alpha
tags: retrospected/backend:alpha
platforms: linux/amd64
push: true

Expand All @@ -61,7 +61,7 @@ jobs:
builder: ${{ steps.buildx.outputs.name }}
file: frontend/Dockerfile
context: .
tags: antoinejaussoin/retro-board-frontend:alpha
tags: retrospected/frontend:alpha
platforms: linux/amd64
push: true

Expand All @@ -71,6 +71,6 @@ jobs:
builder: ${{ steps.buildx.outputs.name }}
file: maintenance/Dockerfile
context: maintenance
tags: antoinejaussoin/maintenance:alpha
tags: retrospected/maintenance:alpha
platforms: linux/amd64
push: true
12 changes: 6 additions & 6 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ jobs:
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
username: ${{ secrets.DOCKER_NEW_USERNAME }}
password: ${{ secrets.DOCKER_NEW_PASSWORD }}

- name: Build and push Documentation
uses: docker/build-push-action@v2
with:
builder: ${{ steps.buildx.outputs.name }}
file: docs/Dockerfile
context: docs
tags: antoinejaussoin/retro-board-docs:canary
tags: retrospected/docs:canary
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true

Expand All @@ -51,7 +51,7 @@ jobs:
builder: ${{ steps.buildx.outputs.name }}
file: backend/Dockerfile
context: .
tags: antoinejaussoin/retro-board-backend:canary
tags: retrospected/backend:canary
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true

Expand All @@ -61,7 +61,7 @@ jobs:
builder: ${{ steps.buildx.outputs.name }}
file: frontend/Dockerfile
context: .
tags: antoinejaussoin/retro-board-frontend:canary
tags: retrospected/frontend:canary
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true

Expand All @@ -71,6 +71,6 @@ jobs:
builder: ${{ steps.buildx.outputs.name }}
file: maintenance/Dockerfile
context: maintenance
tags: antoinejaussoin/maintenance:canary
tags: retrospected/maintenance:canary
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
76 changes: 76 additions & 0 deletions .github/workflows/master-old.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: 'Master Build (Old Docker)'

on:
push:
branches: [master]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Read VERSION
id: package
uses: martinbeentjes/npm-get-version-action@master

- name: Echo VERSION
run: echo ${{ steps.package.outputs.current-version }}

- name: Setup QEMU
uses: docker/setup-qemu-action@master
with:
platforms: all

- name: Setup BuildX
uses: docker/setup-buildx-action@v1
id: buildx
with:
install: true

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push Documentation
uses: docker/build-push-action@v2
with:
builder: ${{ steps.buildx.outputs.name }}
file: docs/Dockerfile
context: docs
tags: antoinejaussoin/retro-board-docs:latest,antoinejaussoin/retro-board-docs:${{ steps.package.outputs.current-version }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true

- name: Build and push Backend
uses: docker/build-push-action@v2
with:
builder: ${{ steps.buildx.outputs.name }}
file: backend/Dockerfile
context: .
tags: antoinejaussoin/retro-board-backend:latest,antoinejaussoin/retro-board-backend:${{ steps.package.outputs.current-version }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true

- name: Build and push Frontend
uses: docker/build-push-action@v2
with:
builder: ${{ steps.buildx.outputs.name }}
file: frontend/Dockerfile
context: .
tags: antoinejaussoin/retro-board-frontend:latest,antoinejaussoin/retro-board-frontend:${{ steps.package.outputs.current-version }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true

- name: Build and push Maintenance
uses: docker/build-push-action@v2
with:
builder: ${{ steps.buildx.outputs.name }}
file: maintenance/Dockerfile
context: maintenance
tags: antoinejaussoin/maintenance:latest,antoinejaussoin/maintenance:${{ steps.package.outputs.current-version }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
12 changes: 6 additions & 6 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ jobs:
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
username: ${{ secrets.DOCKER_NEW_USERNAME }}
password: ${{ secrets.DOCKER_NEW_PASSWORD }}

- name: Build and push Documentation
uses: docker/build-push-action@v2
with:
builder: ${{ steps.buildx.outputs.name }}
file: docs/Dockerfile
context: docs
tags: antoinejaussoin/retro-board-docs:latest,antoinejaussoin/retro-board-docs:${{ steps.package.outputs.current-version }}
tags: retrospected/docs:latest,retrospected/docs:${{ steps.package.outputs.current-version }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true

Expand All @@ -51,7 +51,7 @@ jobs:
builder: ${{ steps.buildx.outputs.name }}
file: backend/Dockerfile
context: .
tags: antoinejaussoin/retro-board-backend:latest,antoinejaussoin/retro-board-backend:${{ steps.package.outputs.current-version }}
tags: retrospected/backend:latest,retrospected/backend:${{ steps.package.outputs.current-version }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true

Expand All @@ -61,7 +61,7 @@ jobs:
builder: ${{ steps.buildx.outputs.name }}
file: frontend/Dockerfile
context: .
tags: antoinejaussoin/retro-board-frontend:latest,antoinejaussoin/retro-board-frontend:${{ steps.package.outputs.current-version }}
tags: retrospected/frontend:latest,retrospected/frontend:${{ steps.package.outputs.current-version }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true

Expand All @@ -71,6 +71,6 @@ jobs:
builder: ${{ steps.buildx.outputs.name }}
file: maintenance/Dockerfile
context: maintenance
tags: antoinejaussoin/maintenance:latest,antoinejaussoin/maintenance:${{ steps.package.outputs.current-version }}
tags: retrospected/maintenance:latest,retrospected/maintenance:${{ steps.package.outputs.current-version }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ setup:

build:
docker buildx inspect --bootstrap
docker buildx build --cache-from=antoinejaussoin/maintenance:${PACKAGE_VERSION} --pull --platform ${TARGET_ARCHS} -f ./maintenance/Dockerfile -t antoinejaussoin/maintenance:${PACKAGE_VERSION} ./maintenance
docker buildx build --cache-from=antoinejaussoin/retro-board-backend:${PACKAGE_VERSION} --pull --platform ${TARGET_ARCHS} -f ./backend/Dockerfile -t antoinejaussoin/retro-board-backend:${PACKAGE_VERSION} .
docker buildx build --cache-from=antoinejaussoin/retro-board-frontend:${PACKAGE_VERSION} --pull --platform ${TARGET_ARCHS} -f ./frontend/Dockerfile -t antoinejaussoin/retro-board-frontend:${PACKAGE_VERSION} .
docker buildx build --cache-from=retrospected/maintenance:${PACKAGE_VERSION} --pull --platform ${TARGET_ARCHS} -f ./maintenance/Dockerfile -t retrospected/maintenance:${PACKAGE_VERSION} ./maintenance
docker buildx build --cache-from=retrospected/backend:${PACKAGE_VERSION} --pull --platform ${TARGET_ARCHS} -f ./backend/Dockerfile -t retrospected/backend:${PACKAGE_VERSION} .
docker buildx build --cache-from=retrospected/frontend:${PACKAGE_VERSION} --pull --platform ${TARGET_ARCHS} -f ./frontend/Dockerfile -t retrospected/frontend:${PACKAGE_VERSION} .

single-build:
docker build -f ./maintenance/Dockerfile -t antoinejaussoin/maintenance:${PACKAGE_VERSION} ./maintenance
docker build -f ./backend/Dockerfile -t antoinejaussoin/retro-board-backend:${PACKAGE_VERSION} .
docker build -f ./frontend/Dockerfile -t antoinejaussoin/retro-board-frontend:${PACKAGE_VERSION} .
docker build -f ./maintenance/Dockerfile -t retrospected/maintenance:${PACKAGE_VERSION} ./maintenance
docker build -f ./backend/Dockerfile -t retrospected/backend:${PACKAGE_VERSION} .
docker build -f ./frontend/Dockerfile -t retrospected/frontend:${PACKAGE_VERSION} .
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ services:
max-size: '50m'

backend:
image: antoinejaussoin/retro-board-backend:latest
image: retrospected/backend:latest
depends_on:
- redis
environment:
Expand Down Expand Up @@ -54,7 +54,7 @@ services:
max-size: '50m'

frontend:
image: antoinejaussoin/retro-board-frontend:latest
image: retrospected/frontend:latest
depends_on:
- backend
ports:
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/self-hosting/backup.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ This should return a list of containers running, looking like this:

```shell
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6556474a1b19 antoinejaussoin/retro-board-frontend:latest "/frontend-entrypoin…" 2 days ago Up 2 days 0.0.0.0:3000->80/tcp, :::3000->80/tcp prod_frontend_1
beb4fa7d3bd3 antoinejaussoin/retro-board-backend:latest "docker-entrypoint.s…" 2 days ago Up 2 days prod_backend_1
6556474a1b19 retrospected/frontend:latest "/frontend-entrypoin…" 2 days ago Up 2 days 0.0.0.0:3000->80/tcp, :::3000->80/tcp prod_frontend_1
beb4fa7d3bd3 retrospected/backend:latest "docker-entrypoint.s…" 2 days ago Up 2 days prod_backend_1
223f6cd73aaf redis:latest "docker-entrypoint.s…" 6 days ago Up 6 days 6379/tcp beta_redis_1
6aa8d4e70ed0 dpage/pgadmin4:latest "/entrypoint.sh" 2 weeks ago Up 2 weeks 80/tcp, 443/tcp, 0.0.0.0:3001->3001/tcp, :::3001->3001/tcp prod_pgadmin_1
dc629da8fb41 postgres:11.6 "docker-entrypoint.s…" 7 months ago Up 4 weeks 5432/tcp prod_postgres_1
Expand Down
66 changes: 31 additions & 35 deletions docs/docs/self-hosting/quick-start/ComposeView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ type ComposeViewProps = {
licence: string;
port: string;
pgPort: string;
arm: boolean;
};

export default function ComposeView({
Expand All @@ -20,70 +21,65 @@ export default function ComposeView({
sessionSecret,
port,
pgPort,
arm,
}: ComposeViewProps) {
return (
<SyntaxHighlighter language="yaml" style={xonokai}>
{`version: '3'
services:
postgres:
image: postgres:11.6
hostname: postgres
environment:
# Only change the Database password below BEFORE running for the first time. Once the database
# is initialised, you can't change the password anymore.
# This password has to be the same as the DB_PASSWORD in the "backend" section below.
POSTGRES_PASSWORD: '${dbPassword}'
# -- Dot not modify --
POSTGRES_USER: postgres
POSTGRES_DB: retroboard
volumes:
- database:/var/lib/postgresql/data
frontend:
image: retrospected/frontend:latest
depends_on:
- backend
ports:
- '${port}:80'
restart: unless-stopped
logging:
driver: 'json-file'
options:
max-size: '50m'
backend:
image: antoinejaussoin/retro-board-backend:latest
image: retrospected/backend:latest
depends_on:
- redis
environment:
LICENCE_KEY: '${licence}' # Your personal licence key
SELF_HOSTED_ADMIN: '${email}' # This is the user who is going to be admin on the self-hosted Retrospected instance.
DB_PASSWORD: '${dbPassword}' # Must be the same as POSTGRES_PASSWORD above
SESSION_SECRET: '${sessionSecret}' # This can be anything. You don't have to change this.
LICENCE_KEY: '${licence}'
SELF_HOSTED_ADMIN: '${email}'
DB_PASSWORD: '${dbPassword}'
SESSION_SECRET: '${sessionSecret}'
restart: unless-stopped
logging:
driver: 'json-file'
options:
max-size: '50m'
pgadmin:
image: dpage/pgadmin4:4.15 # use biarms/pgadmin4 on ARM
depends_on:
- postgres
ports:
- '${pgPort}:80' # Change ${pgPort} to whatever port you want to access pgAdmin from
postgres:
image: postgres:11.6
hostname: postgres
environment:
PGADMIN_DEFAULT_EMAIL: '${email}' # This will give you access to PGAdmin to manage your database
PGADMIN_DEFAULT_PASSWORD: '${pgPassword}' # Your default password. Change this if you want, but BEFORE running for the first time.
POSTGRES_PASSWORD: '${dbPassword}'
POSTGRES_USER: postgres
POSTGRES_DB: retroboard
volumes:
- pgadmin:/var/lib/pgadmin
- database:/var/lib/postgresql/data
restart: unless-stopped
logging:
driver: 'json-file'
options:
max-size: '50m'
frontend:
image: antoinejaussoin/retro-board-frontend:latest
pgadmin:
image: ${!arm ? 'dpage/pgadmin4:4.15' : 'biarms/pgadmin4'}
depends_on:
- backend
- postgres
ports:
- '${port}:80' # Change ${port} to whatever port you want to access Retrospected from
- '${pgPort}:80'
environment:
PGADMIN_DEFAULT_EMAIL: '${email}'
PGADMIN_DEFAULT_PASSWORD: '${pgPassword}'
volumes:
- pgadmin:/var/lib/pgadmin
restart: unless-stopped
logging:
driver: 'json-file'
Expand Down
6 changes: 6 additions & 0 deletions docs/docs/self-hosting/quick-start/Editor.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@ div.settings {
flex-wrap: wrap;
margin-bottom: 30px;
}

div.toggle {
display: flex;
align-items: center;
padding: 20px 0;
}
Loading

0 comments on commit 54ed218

Please sign in to comment.