-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5149 from newrelic/5030_improve_local_development
improvements for local development
- Loading branch information
Showing
8 changed files
with
274 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM ubuntu:20.04 | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
RUN apt update -qq && \ | ||
apt install -y --no-install-recommends curl git npm && \ | ||
apt clean && rm -rf /tmp/* var/tmp/* | ||
|
||
WORKDIR /home | ||
|
||
RUN npm install -g yarn typescript n | ||
RUN n 16 && npm install sequelize sequelize-cli pg | ||
|
||
COPY migrations /home/migrations | ||
COPY config /home/config | ||
|
||
RUN curl -O https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh | ||
RUN chmod +x wait-for-it.sh | ||
|
||
CMD ["./wait-for-it.sh", "db:5432", "--", "npx", "sequelize-cli", "db:migrate"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#! /bin/bash | ||
|
||
docker container stop testing_pgadmin_1 testing_migration_1 testing_postgres_1 | ||
|
||
docker container rm testing_pgadmin_1 testing_migration_1 testing_postgres_1 | ||
|
||
docker volume rm testing_pgadmin testing_postgres |
23 changes: 23 additions & 0 deletions
23
scripts/actions/translation_workflow/testing/config/config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"development": { | ||
"username": "root", | ||
"password": "root", | ||
"database": "translations", | ||
"host": "postgres", | ||
"dialect": "postgres" | ||
}, | ||
"test": { | ||
"username": "root", | ||
"password": "root", | ||
"database": "translations", | ||
"host": "postgres", | ||
"dialect": "postgres" | ||
}, | ||
"production": { | ||
"username": "root", | ||
"password": "root", | ||
"database": "translations", | ||
"host": "postgres", | ||
"dialect": "postgres" | ||
} | ||
} |
78 changes: 0 additions & 78 deletions
78
scripts/actions/translation_workflow/testing/creation_and_cleanup.sql
This file was deleted.
Oops, something went wrong.
36 changes: 36 additions & 0 deletions
36
scripts/actions/translation_workflow/testing/docker-compose.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
version: "3.9" | ||
|
||
services: | ||
postgres: | ||
image: postgres:14-alpine | ||
restart: always | ||
environment: | ||
POSTGRES_PASSWORD: root | ||
POSTGRES_USER: root | ||
POSTGRES_DB: translations | ||
ports: | ||
- 5432:5432 | ||
volumes: | ||
- postgres:/var/lib/postgresql/data | ||
pgadmin: | ||
image: dpage/pgadmin4:6.2 | ||
environment: | ||
PGADMIN_DEFAULT_EMAIL: admin@pgadmin.com | ||
PGADMIN_DEFAULT_PASSWORD: password | ||
PGADMIN_LISTEN_PORT: 80 | ||
ports: | ||
- 15432:80 | ||
volumes: | ||
- pgadmin:/var/lib/pgadmin | ||
depends_on: | ||
- postgres | ||
migration: | ||
build: | ||
context: . | ||
dockerfile: ./Dockerfile | ||
depends_on: | ||
- "postgres" | ||
|
||
volumes: | ||
postgres: | ||
pgadmin: |
Oops, something went wrong.