Skip to content

Commit

Permalink
docker and env prod sample
Browse files Browse the repository at this point in the history
  • Loading branch information
yanikproulx committed Jan 30, 2024
1 parent 6f8fc64 commit 576ea7f
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 37 deletions.
47 changes: 47 additions & 0 deletions .env.prod.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Environment variables declared in this file are automatically made available to Prisma.
# See the documentation for more detail: https://pris.ly/d/prisma-schema#using-environment-variables

# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server (Preview) and MongoDB (Preview).
# See the documentation for all the connection string options: https://pris.ly/d/connection-strings

DATABASE_URL="mysql://[DB_USER]:[DB_PASSWORD]@db:3306/marathon"
PRISMA_LOG_QUERY="false"

# Locale
DEFAULT_LOCALE="en"

# Local development env
NODE_ENV=production
PORT=3001

# Auth
BEARER=
ALLOWED_ORIGINS=""

# Storage
AWS_S3_REGION_NAME=
AWS_STORAGE_BUCKET_NAME=
AWS_S3_ENDPOINT_URL=
AWS_DEFAULT_ACL=public-read
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
PUBLIC_MEDIA_URI=

# AssetBundles
ASSET_BUNDLE_FOLDER="asset-bundles"
DEFAULT_PLATFORM="webgl"

# Marathon API
MARATHON_API="https://www.marathonhardware.com"
MARATHON_API_LOGIN="/drawer/login"
MARATHON_API_GRAPHQL="/pimcore-graphql-webservices/drawer-config"
MARATHON_API_GRAPHQL_KEY=""
MARATHON_API_CREATE_LIST="/drawer/createList"
MARATHON_API_SYNC="false"
MARATHON_SYNC_PRODUCTS_PER_PAGE="50"
MARATHON_SYNC_EMPTY_PAGES_TO_STOP="50"
MARATHON_MEDIA_URI="https://www.marathonhardware.com"
SYNC_AUTH="123"
MARATHON_COLLECTIONS_WHITELIST="area,imprint,autograph"
MARATHON_FINISHES_WHITELIST="walnut,birch,silk-white,matte-grey,matte-grey-textured,matte-black,stardust,silver-anodized,gold,silver-grey,chrome"
MARATHON_DRAWER_TYPES_WHITELIST="shallow,deep"
54 changes: 27 additions & 27 deletions docker-compose.sample → docker-compose.dev.sample
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
version: '3.7'
x-common-props: &common-props
build:
context: ./
target: base
working_dir: /base
volumes:
- ./:/base
env_file:
- .env
services:
npm:
<<: *common-props
entrypoint: npm
dev:
<<: *common-props
ports:
- '${PORT}:${PORT}'
command: npm run dev
prod:
build: .
env_file:
- .env
ports:
- '${PORT}:${PORT}'
version: '3.7'

x-common-props: &common-props
build:
context: ./
target: base
working_dir: /base
volumes:
- ./:/base
env_file:
- .env

services:
npm:
<<: *common-props
entrypoint: npm
dev:
<<: *common-props
ports:
- '${PORT}:${PORT}'
command: npm run dev
prod:
build: .
env_file:
- .env
ports:
- '${PORT}:${PORT}'
25 changes: 25 additions & 0 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: '3.7'

services:
db:
container_name: marathon-db
image: mysql:8.0
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: marathon
MYSQL_USER: marathon
MYSQL_PASSWORD: whg-vha5UHE-tfu5cwt
volumes:
- ./data/mysql:/var/lib/mysql
ports:
- 3306:3306
back:
container_name: marathon-back
build: .
links:
- db:db
env_file:
- .env
ports:
- '${PORT}:${PORT}'

10 changes: 0 additions & 10 deletions docker-compose.server.yml

This file was deleted.

0 comments on commit 576ea7f

Please sign in to comment.