Skip to content

Commit

Permalink
chore: clean up dev env
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixNgFender committed Mar 17, 2024
1 parent d5ed6f1 commit 7206e93
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 63 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Lint Code

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run linter
# TODO: Change to npm ci when the whole next.js thing is set
run: |
npm i
npm run lint
19 changes: 0 additions & 19 deletions bucket-creation.Dockerfile

This file was deleted.

62 changes: 20 additions & 42 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,51 +3,31 @@ version: '3.8'
name: mu2mi

services:
# web-migration:
# build:
# context: .
# dockerfile: migration.Dockerfile
# target: migration
# container_name: web-migration
# restart: on-failure
# environment:
# - DATABASE_URL=${DATABASE_URL}
# depends_on:
# postgres:
# condition: service_healthy
# network_mode: host

# bucket-creation:
# build:
# context: .
# dockerfile: bucket-creation.Dockerfile
# target: bucket-creation
# container_name: bucket-creation
# restart: on-failure
# environment:
# - S3_ENDPOINT=${S3_ENDPOINT}
# - S3_PORT=${S3_PORT}
# - S3_USE_SSL=${S3_USE_SSL}
# - S3_ACCESS_KEY=${S3_ACCESS_KEY}
# - S3_SECRET_KEY=${S3_SECRET_KEY}
# - S3_BUCKET_NAME=${S3_BUCKET_NAME}
# - S3_BUCKET_REGION=${S3_BUCKET_REGION}
# depends_on:
# minio:
# condition: service_healthy
# network_mode: host
web-migration:
build:
context: .
dockerfile: migration.Dockerfile
target: migration
container_name: web-migration
restart: on-failure
environment:
- DATABASE_URL=${DATABASE_URL}
depends_on:
postgres:
condition: service_healthy
network_mode: host

postgres:
image: postgres:16.1-alpine3.19
container_name: postgres
restart: unless-stopped
environment:
- PGUSER=postgres
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_PASSWORD=awesomepassword
volumes:
- postgres-data:/var/lib/postgresql/data
ports:
- ${POSTGRES_PORT}:${POSTGRES_PORT}
- '5432:5432'
healthcheck:
test: ['CMD-SHELL', 'pg_isready']
interval: 1s
Expand All @@ -62,7 +42,7 @@ services:
volumes:
- redis-data:/data
ports:
- ${REDIS_PORT}:${REDIS_PORT}
- '6379:6379'
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 1s
Expand All @@ -73,13 +53,13 @@ services:
image: quay.io/minio/minio:RELEASE.2024-01-18T22-51-28Z
container_name: minio
restart: unless-stopped
command: server /data --console-address ":${S3_CONSOLE_PORT}"
command: server /data --console-address :9001
environment:
- MINIO_ROOT_USER=${S3_ACCESS_KEY}
- MINIO_ROOT_PASSWORD=${S3_SECRET_KEY}
ports:
- ${INTERNAL_S3_PORT}:${INTERNAL_S3_PORT}
- ${S3_CONSOLE_PORT}:${S3_CONSOLE_PORT}
- 9000:9000
- 9001:9001
volumes:
- minio_data:/data
healthcheck:
Expand All @@ -92,10 +72,8 @@ services:
image: minio/mc
container_name: bucket-init
restart: no
entrypoint: /bin/sh -c "/usr/bin/mc config host add minio http://${INTERNAL_S3_ENDPOINT}:${INTERNAL_S3_PORT} ${S3_ACCESS_KEY} ${S3_SECRET_KEY} && /usr/bin/mc mb minio/${S3_BUCKET_NAME} && /usr/bin/mc anonymous set public minio/${S3_BUCKET_NAME} && exit 0"
entrypoint: /bin/sh -c "/usr/bin/mc config host add minio http://minio:9000 ${S3_ACCESS_KEY} ${S3_SECRET_KEY} && /usr/bin/mc mb minio/${S3_BUCKET_NAME} && /usr/bin/mc anonymous set public minio/${S3_BUCKET_NAME} && exit 0"
environment:
- INTERNAL_S3_ENDPOINT=${INTERNAL_S3_ENDPOINT}
- INTERNAL_S3_PORT=${INTERNAL_S3_PORT}
- S3_ACCESS_KEY=${S3_ACCESS_KEY}
- S3_SECRET_KEY=${S3_SECRET_KEY}
- S3_BUCKET_NAME=${S3_BUCKET_NAME}
Expand Down
2 changes: 0 additions & 2 deletions web.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ COPY . .
# Uncomment the following line in case you want to disable telemetry during the build.
ENV NEXT_TELEMETRY_DISABLED 1

ARG ENABLE_ALPINE_PRIVATE_NETWORKING

ARG NEXT_MANUAL_SIG_HANDLE
ARG PROTOCOL
ARG HOST
Expand Down

0 comments on commit 7206e93

Please sign in to comment.