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
FROM node:lts-alpine3.12 as build | |
WORKDIR /frontend | |
COPY ./frontend/package.json ./ | |
COPY ./frontend/yarn.lock ./ | |
RUN yarn install | |
COPY ./frontend/ ./ | |
RUN yarn build | |
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
upstream api { | |
server backend:8000; | |
} | |
server { | |
listen 80; | |
location /api/ { | |
proxy_pass http://api; | |
} |
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
FROM python:3.9 | |
ENV PYTHONUNBUFFERED=1 | |
WORKDIR /backend | |
RUN pip install pipenv | |
COPY Pipfile* /backend/ | |
RUN pipenv lock --requirements > requirements.txt | |
RUN pip install -r requirements.txt | |
COPY entrypoint.sh /entrypoint.sh | |
RUN chmod +x /entrypoint.sh |
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
#!/bin/bash | |
# Collect static files | |
echo "Collect static files" | |
python3 manage.py collectstatic --no-input | |
# Start server | |
echo "Starting server" | |
# python3 manage.py runserver 0.0.0.0:8000 | |
gunicorn server.wsgi:application --bind 0.0.0.0:8000 |
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
version: "3.9" | |
services: | |
db: | |
image: mysql:8.0 | |
command: mysqld --default-authentication-plugin=mysql_native_password | |
restart: always | |
environment: | |
- MYSQL_ROOT_PASSWORD=<password> | |
- MYSQL_DATABASE=<db> |
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
#import <Foundation/Foundation.h> | |
#import <React/RCTBridgeModule.h> | |
NS_ASSUME_NONNULL_BEGIN | |
@interface RCTSatisMeter : NSObject <RCTBridgeModule> | |
@end | |
NS_ASSUME_NONNULL_END |
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
#import "RCTSatisMeter.h" | |
#import "SatisMeter/SatisMeter.h" | |
@implementation RCTSatisMeter | |
- (dispatch_queue_t)methodQueue | |
{ | |
return dispatch_get_main_queue(); | |
} |
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
import React, {useEffect} from 'react'; | |
import {View, Text, NativeModules} from 'react-native'; | |
const App = () => { | |
useEffect(() => { | |
NativeModules.SatisMeter.hook( | |
<userId>, //user id | |
<writeKey>, // satismeter write key | |
{ // extra payload | |
name, |
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
package com.rn_bridge_satismeter; | |
import android.app.Activity; | |
import com.facebook.react.bridge.Callback; | |
import com.facebook.react.bridge.ReactApplicationContext; | |
import com.facebook.react.bridge.ReactContextBaseJavaModule; | |
import com.facebook.react.bridge.ReactMethod; | |
import com.facebook.react.bridge.Callback; |
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
package com.rn_bridge_satismeter; | |
import java.util.Arrays; | |
import java.util.Collections; | |
import java.util.List; | |
import com.facebook.react.ReactPackage; | |
import com.facebook.react.bridge.NativeModule; | |
import com.facebook.react.bridge.ReactApplicationContext; | |
import com.facebook.react.uimanager.ViewManager; |
OlderNewer